[FFmpeg-cvslog] avcodec/snowdec: check av_frame_ref() return value
Michael Niedermayer
git at videolan.org
Wed Dec 11 01:22:08 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 11 00:30:43 2013 +0100| [42874666a6cb53fac4eec99eff27f8975b799f92] | committer: Michael Niedermayer
avcodec/snowdec: check av_frame_ref() return value
Fixes CID1135742
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42874666a6cb53fac4eec99eff27f8975b799f92
---
libavcodec/snowdec.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index c9d40b8..79cf5a1 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;
More information about the ffmpeg-cvslog
mailing list