diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-19 15:22:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-19 15:26:23 +0100 |
commit | feeb8ca56dc08bda19174502a687ae262ea3ee21 (patch) | |
tree | 5e32226937d4b373164ecc59032df9da1301f4c6 /libavcodec/vp56.c | |
parent | 5f476cfe6e388ae2b59a63ab34d8d014a780db5c (diff) | |
download | ffmpeg-feeb8ca56dc08bda19174502a687ae262ea3ee21.tar.gz |
vp56: Check av_frame_ref() return code
Fixes CID991837
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r-- | libavcodec/vp56.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index 15691e04a1..6bf391c075 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -502,6 +502,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, int remaining_buf_size = avpkt->size; int av_uninit(alpha_offset); int i, res; + int ret; if (s->has_alpha) { if (remaining_buf_size < 3) @@ -529,7 +530,10 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, if (s->has_alpha) { av_frame_unref(s->alpha_context->frames[VP56_FRAME_CURRENT]); - av_frame_ref(s->alpha_context->frames[VP56_FRAME_CURRENT], p); + if ((ret = av_frame_ref(s->alpha_context->frames[VP56_FRAME_CURRENT], p)) < 0) { + av_frame_unref(p); + return ret; + } } if (res == VP56_SIZE_CHANGE) { |