[FFmpeg-cvslog] h264: fix memleak on error during SPS parsing

Janne Grunau git at videolan.org
Sun Dec 16 13:22:48 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Fri Dec 14 21:08:24 2012 +0100| [a421bbfe83ad55eff335fc19bbacc1e9fecfc3cf] | committer: Janne Grunau

h264: fix memleak on error during SPS parsing

Introduced in d7d6efe42b0d.

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

 libavcodec/h264_ps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 0166ad2..7eb8726 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -357,7 +357,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
         av_log(h->s.avctx, AV_LOG_ERROR,
                "log2_max_frame_num_minus4 out of range (0-12): %d\n",
                log2_max_frame_num_minus4);
-        return AVERROR_INVALIDDATA;
+        goto fail;
     }
     sps->log2_max_frame_num = log2_max_frame_num_minus4 + 4;
 



More information about the ffmpeg-cvslog mailing list