diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-31 05:25:42 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-31 05:33:50 +0300 |
commit | 385fe984fc6cd784812f46e784ddf51c58ab000d (patch) | |
tree | e03831c16c6b480029dab5963069ed95a87c90f4 /libavcodec/snowenc.c | |
parent | a38758a97efe9c2de48b5429fd2fdebd55ba6a64 (diff) |
avcodec/snowenc: Check av_frame_ref() return value
Fixes CID1026740
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index e03dc136d5..d192d1ce14 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1622,7 +1622,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, ff_snow_frame_start(s); av_frame_unref(avctx->coded_frame); - av_frame_ref(avctx->coded_frame, s->current_picture); + ret = av_frame_ref(avctx->coded_frame, s->current_picture); + if (ret < 0) + return ret; s->m.current_picture_ptr= &s->m.current_picture; s->m.current_picture.f = s->current_picture; |