mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/msvideo1: Fix palette in case of seek before decode
Fixes Ticket3212 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
669043db81
commit
f3eef02746
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user