summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-28 13:20:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-28 13:20:22 +0100
commitf3eef02746ef9585400f58de7803c2db7efd7b4a (patch)
treef5f19b25c496f91180cdcabcf366d6c78ea6f311
parent669043db811a6dec2236284a40117fdbf1d32ba1 (diff)
downloadffmpeg-f3eef02746ef9585400f58de7803c2db7efd7b4a.tar.gz
avcodec/msvideo1: Fix palette in case of seek before decode
Fixes Ticket3212 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/msvideo1.c2
1 files changed, 2 insertions, 0 deletions
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;