[FFmpeg-cvslog] avcodec/kmvc: Prefer in-band palette
Andreas Rheinhardt
git at videolan.org
Thu Mar 25 01:42:01 EET 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Mon Mar 22 02:14:35 2021 +0100| [fb6a8847ad60cd5d6f50d459743b46c23900d542] | committer: Andreas Rheinhardt
avcodec/kmvc: Prefer in-band palette
Fixes decoding of https://samples.ffmpeg.org/V-codecs/KMVC/LOGO2.AVI
Reviewed-by: Tomas Härdin <tjoppen at acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb6a8847ad60cd5d6f50d459743b46c23900d542
---
libavcodec/kmvc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index cd9e32f443..8d9f0a9693 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -275,6 +275,8 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame,
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;
+ frame->palette_has_changed = ff_copy_palette(ctx->pal, avpkt, avctx);
+
header = bytestream2_get_byte(&ctx->g);
/* blocksize 127 is really palette change event */
@@ -303,9 +305,6 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame,
}
}
- if (ff_copy_palette(ctx->pal, avpkt, avctx))
- frame->palette_has_changed = 1;
-
if (ctx->setpal) {
ctx->setpal = 0;
frame->palette_has_changed = 1;
More information about the ffmpeg-cvslog
mailing list