Commit 385fe984 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/snowenc: Check av_frame_ref() return value

Fixes CID1026740
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a38758a9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment