Skip to content
Snippets Groups Projects
Commit 7e99d528 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

ffv1enc: Check return value of av_frame_ref()


Fixes CID1026740
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 8a266aaa
No related branches found
No related tags found
No related merge requests found
......@@ -1016,7 +1016,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8);
av_frame_unref(p);
av_frame_ref(p, pict);
if ((ret = av_frame_ref(p, pict)) < 0)
return ret;
p->pict_type = AV_PICTURE_TYPE_I;
if (avctx->gop_size == 0 || f->picture_number % avctx->gop_size == 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment