[MPlayer-cvslog] r37563 - trunk/libmpcodecs/vd_ffmpeg.c
cehoyos
subversion at mplayerhq.hu
Sat Dec 12 18:34:35 CET 2015
Author: cehoyos
Date: Sat Dec 12 18:34:35 2015
New Revision: 37563
Log:
mpcodecs/vd_ffmpeg: Do not overwrite palette with random extradata.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Fri Dec 11 00:38:36 2015 (r37562)
+++ trunk/libmpcodecs/vd_ffmpeg.c Sat Dec 12 18:34:35 2015 (r37563)
@@ -897,6 +897,9 @@ static mp_image_t *decode(sh_video_t *sh
pkt.size = len;
// Necessary to decode e.g. CorePNG and ZeroCodec correctly
pkt.flags = (sh->ds->flags & 1) ? AV_PKT_FLAG_KEY : 0;
+ av_packet_split_side_data(&pkt);
+ if (av_packet_get_side_data(&pkt, AV_PKT_DATA_PALETTE, NULL))
+ ctx->palette_sent = 1;
if (!ctx->palette_sent && sh->bih && sh->bih->biBitCount <= 8) {
/* Pass palette to codec */
uint8_t *pal_data = (uint8_t *)(sh->bih+1);
More information about the MPlayer-cvslog
mailing list