summaryrefslogtreecommitdiff
path: root/libavcodec/paf.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-07-30 13:00:44 +0000
committerPaul B Mahol <onemda@gmail.com>2012-08-01 03:16:55 +0000
commit296bcdd2a76bb8b98caf7249530dc1cf6e1a2624 (patch)
tree3d30ca410d877b2ba7f0a3ab5e6befe330f2e563 /libavcodec/paf.c
parentc36bad3b895c908c270af8b526687307a15855d9 (diff)
paf: use reget_bufer() instead of get_buffer()
Pallete is written to frame->data[1] only if it changes. This fixes PAL8->PAL8 transcoding. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/paf.c')
-rw-r--r--libavcodec/paf.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/paf.c b/libavcodec/paf.c
index 0d982d9423..5428883454 100644
--- a/libavcodec/paf.c
+++ b/libavcodec/paf.c
@@ -247,11 +247,8 @@ static int paf_vid_decode(AVCodecContext *avctx, void *data,
uint8_t code, *dst, *src, *end;
int i, frame, ret;
- if (c->pic.data[0])
- avctx->release_buffer(avctx, &c->pic);
-
- c->pic.reference = 0;
- if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0)
+ c->pic.reference = 3;
+ if ((ret = avctx->reget_buffer(avctx, &c->pic)) < 0)
return ret;
bytestream2_init(&c->gb, pkt->data, pkt->size);