diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-11-05 19:48:39 +0100 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-11-05 23:25:20 +0100 |
commit | 371e1654434f5934ca1665df22387024a82e6e27 (patch) | |
tree | 83f51e22bd76e8145b88691697755e93f2da3ae4 | |
parent | fb2288834ba8a51e8934cfe8b82ac468144a34df (diff) | |
download | ffmpeg-371e1654434f5934ca1665df22387024a82e6e27.tar.gz |
Try to set AVFrame.reference to correct values.
I am not sure these new values are correct, not am I sure
the semantics are a good idea since we do not seem to make any
use of them but they caused a lot of confusion, but this
seems to make things closer to matching the documentation.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
40 files changed, 45 insertions, 45 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index e6638c7b4b..9350f06e9b 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -821,7 +821,7 @@ static int decode_frame(AVCodecContext *avctx, avctx->flags |= CODEC_FLAG_EMU_EDGE; // alternatively we would have to use our own buffer management - p->reference= 1; + p->reference= 3; if (avctx->reget_buffer(avctx, p) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return -1; @@ -841,7 +841,7 @@ static int decode_frame(AVCodecContext *avctx, } }else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){ if(!f->last_picture.data[0]){ - f->last_picture.reference= 1; + f->last_picture.reference= 3; if(avctx->get_buffer(avctx, &f->last_picture) < 0){ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index f0407bc94b..919bbc72bd 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -65,7 +65,7 @@ static int aasc_decode_frame(AVCodecContext *avctx, AascContext *s = avctx->priv_data; int compr, i, stride; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame)) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/anm.c b/libavcodec/anm.c index 188f8296f3..5493be6842 100644 --- a/libavcodec/anm.c +++ b/libavcodec/anm.c @@ -45,7 +45,7 @@ static av_cold int decode_init(AVCodecContext *avctx) return -1; avcodec_get_frame_defaults(&s->frame); - s->frame.reference = 1; + s->frame.reference = 3; buf = avctx->extradata + 16*8; for (i = 0; i < 256; i++) diff --git a/libavcodec/avs.c b/libavcodec/avs.c index 9e73695f5e..cf965b38a0 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -63,7 +63,7 @@ avs_decode_frame(AVCodecContext * avctx, av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return -1; } - p->reference = 1; + p->reference = 3; p->pict_type = AV_PICTURE_TYPE_P; p->key_frame = 0; diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c index fa2db05765..9491abd19e 100644 --- a/libavcodec/bethsoftvideo.c +++ b/libavcodec/bethsoftvideo.c @@ -40,7 +40,7 @@ static av_cold int bethsoftvid_decode_init(AVCodecContext *avctx) { BethsoftvidContext *vid = avctx->priv_data; avcodec_get_frame_defaults(&vid->frame); - vid->frame.reference = 1; + vid->frame.reference = 3; vid->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; avctx->pix_fmt = PIX_FMT_PAL8; diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c index 1f31d7fb61..8f4770e78f 100644 --- a/libavcodec/bfi.c +++ b/libavcodec/bfi.c @@ -61,7 +61,7 @@ static int bfi_decode_frame(AVCodecContext * avctx, void *data, if (bfi->frame.data[0]) avctx->release_buffer(avctx, &bfi->frame); - bfi->frame.reference = 1; + bfi->frame.reference = 3; if (avctx->get_buffer(avctx, &bfi->frame) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/c93.c b/libavcodec/c93.c index 1f4ed1fdf0..06ce41624e 100644 --- a/libavcodec/c93.c +++ b/libavcodec/c93.c @@ -130,7 +130,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, c93->currentpic ^= 1; - newpic->reference = 1; + newpic->reference = 3; newpic->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE; if (avctx->reget_buffer(avctx, newpic)) { diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index a0ec7b89d0..b748f278ef 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -427,7 +427,7 @@ static int cinepak_decode_frame(AVCodecContext *avctx, s->data = buf; s->size = buf_size; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame)) { diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c index 8f7f132271..1e157edcbc 100644 --- a/libavcodec/cscd.c +++ b/libavcodec/cscd.c @@ -149,7 +149,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, if (c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); - c->pic.reference = 1; + c->pic.reference = 3; c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->get_buffer(avctx, &c->pic) < 0) { diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c index 20ec0a2265..ae2f94d8c4 100644 --- a/libavcodec/eacmv.c +++ b/libavcodec/eacmv.c @@ -175,7 +175,7 @@ static int cmv_decode_frame(AVCodecContext *avctx, FFSWAP(AVFrame, s->last_frame, s->last2_frame); FFSWAP(AVFrame, s->frame, s->last_frame); - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; if (avctx->get_buffer(avctx, &s->frame)<0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index b0c42f0222..ebad3b336c 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -277,7 +277,7 @@ static int decode_frame(AVCodecContext *avctx, avctx->release_buffer(avctx, &t->last_frame); } - t->frame.reference = 1; + t->frame.reference = 3; if (!t->frame.data[0]) { if (avctx->get_buffer(avctx, &t->frame) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index 26bf524339..5559dc949f 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -289,7 +289,7 @@ static int tgv_decode_frame(AVCodecContext *avctx, /* shuffle */ FFSWAP(AVFrame, s->frame, s->last_frame); if (!s->frame.data[0]) { - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; s->frame.linesize[0] = s->width; diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c index fa925983a9..10ad270823 100644 --- a/libavcodec/flicvideo.c +++ b/libavcodec/flicvideo.c @@ -160,7 +160,7 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx, unsigned char *pixels; unsigned int pixel_limit; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); @@ -478,7 +478,7 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx, int pixel; unsigned int pixel_limit; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index aad8731028..d6f9a554cf 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -172,7 +172,7 @@ static int decode_frame(AVCodecContext *avctx, return -1; } - f->reference = 1; + f->reference = 3; f->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; @@ -215,7 +215,7 @@ static int decode_frame(AVCodecContext *avctx, return -1; } - f->reference = 1; + f->reference = 3; f->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; @@ -243,7 +243,7 @@ static int decode_frame(AVCodecContext *avctx, */ avctx->pix_fmt = PIX_FMT_YUVJ420P; planes = 3; - f->reference = 1; + f->reference = 3; f->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; @@ -288,7 +288,7 @@ static int decode_frame(AVCodecContext *avctx, /* Virtually the same as version 4, but is for RGB24 */ avctx->pix_fmt = PIX_FMT_BGR24; planes = 3; - f->reference = 1; + f->reference = 3; f->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 31aa6f0947..39fa7323f0 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -302,7 +302,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if ((err = extract_header(avctx, NULL)) < 0) return err; - s->frame.reference = 1; + s->frame.reference = 3; return 0; } diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index f7798e307d..871a604406 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -146,7 +146,7 @@ static int ir2_decode_frame(AVCodecContext *avctx, AVFrame * const p= (AVFrame*)&s->picture; int start; - p->reference = 1; + p->reference = 3; p->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, p)) { av_log(s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c index 7ac4c01fba..32d9a34a2d 100644 --- a/libavcodec/kmvc.c +++ b/libavcodec/kmvc.c @@ -238,7 +238,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa if (ctx->pic.data[0]) avctx->release_buffer(avctx, &ctx->pic); - ctx->pic.reference = 1; + ctx->pic.reference = 3; ctx->pic.buffer_hints = FF_BUFFER_HINTS_VALID; if (avctx->get_buffer(avctx, &ctx->pic) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 1deed0b87f..3bdb562503 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -351,7 +351,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, return -1; } - ctx->buf_ptrs[ctx->cur_index].reference = 1; + ctx->buf_ptrs[ctx->cur_index].reference = 3; ctx->buf_ptrs[ctx->cur_index].pict_type = is_pframe ? AV_PICTURE_TYPE_P:AV_PICTURE_TYPE_I; if(ff_thread_get_buffer(avctx, &ctx->buf_ptrs[ctx->cur_index])) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index 0f30e9d35e..183b2987d6 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -59,7 +59,7 @@ static av_cold int mm_decode_init(AVCodecContext *avctx) avctx->pix_fmt = PIX_FMT_PAL8; avcodec_get_frame_defaults(&s->frame); - s->frame.reference = 1; + s->frame.reference = 3; return 0; } diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index ff1152822f..f23a8799b1 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -241,7 +241,7 @@ static int mp_decode_frame(AVCodecContext *avctx, GetBitContext gb; int i, count1, count2, sz; - mp->frame.reference = 1; + mp->frame.reference = 3; mp->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &mp->frame)) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index b9531f34d7..30159bb006 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -86,7 +86,7 @@ static int msrle_decode_frame(AVCodecContext *avctx, s->buf = buf; s->size = buf_size; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame)) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index 570c6282e0..0d7e95e150 100644 --- a/libavcodec/msvideo1.c +++ b/libavcodec/msvideo1.c @@ -296,7 +296,7 @@ static int msvideo1_decode_frame(AVCodecContext *avctx, s->buf = buf; s->size = buf_size; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame)) { av_log(s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index dd3fe67876..c8688d6449 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -506,7 +506,7 @@ static int decode_frame(AVCodecContext *avctx, if(p->data[0]) avctx->release_buffer(avctx, p); - p->reference= 1; + p->reference= 3; if(avctx->get_buffer(avctx, p) < 0){ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); goto fail; diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 43aea13b54..bf3e5db062 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -442,7 +442,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx, s->buf = buf; s->size = buf_size; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE; if (avctx->reget_buffer(avctx, &s->frame)) { diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c index df4a24737d..4c87b3c1b2 100644 --- a/libavcodec/rpza.c +++ b/libavcodec/rpza.c @@ -250,7 +250,7 @@ static int rpza_decode_frame(AVCodecContext *avctx, s->buf = buf; s->size = buf_size; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame)) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index c7eafbc261..04acaec21c 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -367,7 +367,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac if(buf_size <= 769) return 0; - smk->pic.reference = 1; + smk->pic.reference = 3; smk->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if(avctx->reget_buffer(avctx, &smk->pic) < 0){ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 86f4282d54..9ae19ffb45 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -443,7 +443,7 @@ static int smc_decode_frame(AVCodecContext *avctx, s->buf = buf; s->size = buf_size; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE; if (avctx->reget_buffer(avctx, &s->frame)) { diff --git a/libavcodec/snow.c b/libavcodec/snow.c index ca01f9c684..95d4794e72 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -1701,7 +1701,7 @@ static int frame_start(SnowContext *s){ } } - s->current_picture.reference= 1; + s->current_picture.reference= 3; if(s->avctx->get_buffer(s->avctx, &s->current_picture) < 0){ av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c index afe84b8a28..44ae10ecbb 100644 --- a/libavcodec/tiertexseqv.c +++ b/libavcodec/tiertexseqv.c @@ -231,7 +231,7 @@ static int seqvideo_decode_frame(AVCodecContext *avctx, SeqVideoContext *seq = avctx->priv_data; - seq->frame.reference = 1; + seq->frame.reference = 3; seq->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &seq->frame)) { av_log(seq->avctx, AV_LOG_ERROR, "tiertexseqvideo: reget_buffer() failed\n"); diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index 9c2a273f1c..ccebef5495 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -859,7 +859,7 @@ static int truemotion1_decode_frame(AVCodecContext *avctx, if (truemotion1_decode_header(s) == -1) return -1; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame) < 0) { diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 4967e29d93..1054a7e06b 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -767,7 +767,7 @@ static int decode_frame(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer\n"); return -1; } - p->reference = 1; + p->reference = 3; p->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if(avctx->reget_buffer(avctx, p) < 0){ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index 54c008714f..39a0fa91fa 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -81,7 +81,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac if(c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); - c->pic.reference = 1; + c->pic.reference = 3; c->pic.buffer_hints = FF_BUFFER_HINTS_VALID; if(avctx->get_buffer(avctx, &c->pic) < 0){ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index 6d41cd9d06..f96c6ac43c 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -225,7 +225,7 @@ static int ulti_decode_frame(AVCodecContext *avctx, int skip; int tmp; - s->frame.reference = 1; + s->frame.reference = 3; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c index 4c3b2a1621..6fb384a4e4 100644 --- a/libavcodec/utvideo.c +++ b/libavcodec/utvideo.c @@ -297,7 +297,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac if (c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); - c->pic.reference = 1; + c->pic.reference = 3; c->pic.buffer_hints = FF_BUFFER_HINTS_VALID; if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); diff --git a/libavcodec/vb.c b/libavcodec/vb.c index 622ea89790..956d6568b3 100644 --- a/libavcodec/vb.c +++ b/libavcodec/vb.c @@ -205,7 +205,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac if(c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); - c->pic.reference = 1; + c->pic.reference = 3; if(avctx->get_buffer(avctx, &c->pic) < 0){ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index 63ac33db59..718a9b9e75 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -421,7 +421,7 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx, if (buf_size < 16) return buf_size; - s->frame.reference = 1; + s->frame.reference = 3; if (avctx->get_buffer(avctx, &s->frame)) { av_log(s->avctx, AV_LOG_ERROR, "VMD Video: get_buffer() failed\n"); return -1; diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c index 4c9b26c6f8..7655103b6a 100644 --- a/libavcodec/vmnc.c +++ b/libavcodec/vmnc.c @@ -293,7 +293,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac const uint8_t *src = buf; int dx, dy, w, h, depth, enc, chunks, res, size_left; - c->pic.reference = 1; + c->pic.reference = 3; c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if(avctx->reget_buffer(avctx, &c->pic) < 0){ av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index dbbbd54c02..cca3e207b2 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -529,7 +529,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, } if (!is_alpha) { - p->reference = 1; + p->reference = 3; if (avctx->get_buffer(avctx, p) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index 938a5581c4..180dcd47e8 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -378,7 +378,7 @@ static int xan_decode_frame(AVCodecContext *avctx, int ftype; int ret; - s->pic.reference = 1; + s->pic.reference = 3; s->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index 42da1fb600..2694a4c3c8 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -404,7 +404,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac if(c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); - c->pic.reference = 1; + c->pic.reference = 3; c->pic.buffer_hints = FF_BUFFER_HINTS_VALID; if(avctx->get_buffer(avctx, &c->pic) < 0){ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |