aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-11 00:30:43 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-11 01:13:24 +0100
commit42874666a6cb53fac4eec99eff27f8975b799f92 (patch)
tree8d996cca0d25de4167d1f65838487d44bc952f1e
parent11679e1b90f6e52a3643efb45d06ea5adf65098a (diff)
downloadffmpeg-42874666a6cb53fac4eec99eff27f8975b799f92.tar.gz
avcodec/snowdec: check av_frame_ref() return value
Fixes CID1135742 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/snowdec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index c9d40b84e3..79cf5a1853 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -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;