From f3eef02746ef9585400f58de7803c2db7efd7b4a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 28 Feb 2014 13:20:22 +0100 Subject: avcodec/msvideo1: Fix palette in case of seek before decode Fixes Ticket3212 Signed-off-by: Michael Niedermayer --- libavcodec/msvideo1.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec') diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index 970c67ce12..e60abeee27 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; -- cgit v1.2.3