Commit 57731a60 authored by Thomas Guillem's avatar Thomas Guillem

avcodec: keep the palette when updating the format

parent 5739c05f
......@@ -283,6 +283,9 @@ static int lavc_UpdateVideoFormat(decoder_t *dec, AVCodecContext *ctx,
if (val)
return val;
fmt_out.p_palette = dec->fmt_out.video.p_palette;
dec->fmt_out.video.p_palette = NULL;
es_format_Clean(&dec->fmt_out);
es_format_Init(&dec->fmt_out, VIDEO_ES, fmt_out.i_chroma);
dec->fmt_out.video = fmt_out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment