[FFmpeg-cvslog] avcodec/msvideo1: Fix palette in case of seek before decode
Michael Niedermayer
git at videolan.org
Fri Feb 28 14:34:58 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Feb 28 13:20:22 2014 +0100| [f3eef02746ef9585400f58de7803c2db7efd7b4a] | committer: Michael Niedermayer
avcodec/msvideo1: Fix palette in case of seek before decode
Fixes Ticket3212
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f3eef02746ef9585400f58de7803c2db7efd7b4a
---
libavcodec/msvideo1.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index 970c67c..e60abee 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -67,6 +67,8 @@ static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
if (s->avctx->bits_per_coded_sample == 8) {
s->mode_8bit = 1;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ if (avctx->extradata_size >= AVPALETTE_SIZE)
+ memcpy(s->pal, avctx->extradata, AVPALETTE_SIZE);
} else {
s->mode_8bit = 0;
avctx->pix_fmt = AV_PIX_FMT_RGB555;
More information about the ffmpeg-cvslog
mailing list