On 12/28/2015 03:27 AM, Mats Peterson wrote:
On 12/28/2015 03:21 AM, Mats Peterson wrote:
On 12/28/2015 03:16 AM, Michael Niedermayer wrote:
On Mon, Dec 28, 2015 at 12:24:10AM +0000, Carl Eugen Hoyos wrote:
Mats Peterson <matsp888-at-yahoo.com <at> ffmpeg.org> writes:

+        memcpy(st->codec->extradata, matroska->palette,
+                AVPALETTE_SIZE);


As said, please remove this,

you must not fix MPlayer
issues in FFmpeg.

this is true but iam not sure if this is really "just" a mplayer
issue.
If there is a global palette, then it is not unreasonable that it
is placed in a stream global place. This is especially true if not
all packets are copied and the palette from the first packet is
lost as a result.
either way, the commit message for this part just points at mplayer,
which isnt really good for a description of a "bug fix" in libavformat

Patch splited in move and matroska part
i removed this memcpy() for now from what i commited as there is
clearly no consenus on it.
Michael, the concensus is that MPlayer won't work without having the
palette in extradata, since it uses the extradata as the palette when it
adds ANOTHER palette side data packet AFTER the one added in
matroskadec.c. I'm not making this up. Carl is of course right in his
statement that we shouldn't fix MPlayer issues in FFmpeg, but perhaps it
could be a "quick fix" until the MPlayer developers wake up?

Mats

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Especially since MPlayer is such an evident use case of FFmpeg. It even
includes it inside its own source code.

Mats


For the record, at line 423 in libmpdemux/demux_lavf.c in MPlayer, it uses whatever is in extradata to tack onto the end of its "fake" BITMAPINFOHEADER, and which is later used to add this "extraneous" palette side data packet:

if(codec->extradata_size)
  memcpy(sh_video->bih + 1, codec->extradata, codec->extradata_siz

Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to