summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-03 14:06:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-03 14:06:25 +0200
commit7e99d528f95a56f365a8d8e3624f9be4fe87687b (patch)
tree21c1d298b34361dec56de7425d54f03105cd1c69 /libavcodec/ffv1enc.c
parent8a266aaaacc0610c9ee1e3563ef345c46decb2b0 (diff)
downloadffmpeg-7e99d528f95a56f365a8d8e3624f9be4fe87687b.tar.gz
ffv1enc: Check return value of av_frame_ref()
Fixes CID1026740 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index e745c7c0bc..2e58f952cb 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -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) {