ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Tue Mar 31 04:25:42 2015 +0200| [385fe984fc6cd784812f46e784ddf51c58ab000d] | committer: Michael Niedermayer
avcodec/snowenc: Check av_frame_ref() return value Fixes CID1026740 Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=385fe984fc6cd784812f46e784ddf51c58ab000d --- libavcodec/snowenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index e03dc13..d192d1c 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; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog