]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/snowdec: check av_frame_ref() return value
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 10 Dec 2013 23:30:43 +0000 (00:30 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Dec 2013 00:13:24 +0000 (01:13 +0100)
Fixes CID1135742

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/snowdec.c

index c9d40b84e340ebda78d35b84fd4bc152c9fb3622..79cf5a18531dd022ab4718815e17ff622da54096 100644 (file)
@@ -562,9 +562,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     ff_snow_release_buffer(avctx);
 
     if(!(s->avctx->debug&2048))
-        av_frame_ref(picture, s->current_picture);
+        res = av_frame_ref(picture, s->current_picture);
     else
-        av_frame_ref(picture, s->mconly_picture);
+        res = av_frame_ref(picture, s->mconly_picture);
+
+    if (res < 0)
+        return res;
 
     *got_frame = 1;