[FFmpeg-cvslog] avcodec/hevc_ps: do cleanup in case of unsupported bit depth

Michael Niedermayer git at videolan.org
Wed Aug 20 15:19:53 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 20 03:38:30 2014 +0200| [7caacc50aed5e85070aa860f579be87fa4ff5ca5] | committer: Michael Niedermayer

avcodec/hevc_ps: do cleanup in case of unsupported bit depth

Fixes memleak
Fixes CID1231989

Reviewed-by: Timothy Gu <timothygu99 at gmail.com>
Reviewed-by: Mickaël Raulet <mraulet at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7caacc50aed5e85070aa860f579be87fa4ff5ca5
---

 libavcodec/hevc_ps.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 163c5e4..2ccce5f 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -810,7 +810,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
     default:
         av_log(s->avctx, AV_LOG_ERROR,
                "4:2:0, 4:2:2, 4:4:4 supports are currently specified for 8, 10 and 12 bits.\n");
-        return AVERROR_PATCHWELCOME;
+        ret = AVERROR_PATCHWELCOME;
+        goto err;
     }
 
     desc = av_pix_fmt_desc_get(sps->pix_fmt);



More information about the ffmpeg-cvslog mailing list