[FFmpeg-devel] [PATCH] avformat/matroskadec: Output palette as stream side data

Michael Niedermayer michael at niedermayer.cc
Sun Oct 8 19:36:48 EEST 2023


On Thu, Oct 05, 2023 at 02:36:52PM +0200, Andreas Rheinhardt wrote:
> This is simpler implementation-wise (it avoids an almost-always-false
> check in read_packet and decreases sizeof(MatroskaTrack) by about 2/3)
> and makes the side-data available directly after read_header.
> 
> It also fixes the Matroska analog of ticket #10602: If a Matroska track
> has a palette, said palette will be attached as side-data to the
> first packet of said track and most likely, this is one read during
> avformat_find_stream_info(). Yet if this packet is discarded because
> of a seek performed immediately after avformat_find_stream_info(),
> the information about the global palette will never reach the user.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> Ticket #10602 can unfortunately not be fixed in this way,
> because avi allows to update the palette mid-stream,
> so that the palette contained in extradata must not be
> exported via global side data due to the semantics of the latter.
> 
>  libavformat/matroskadec.c | 39 ++++++++++++---------------------------
>  1 file changed, 12 insertions(+), 27 deletions(-)

breaks:
aletrek.mkv

probably here:
https://trac.ffmpeg.org/attachment/ticket/5071/aletrek.mkv

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231008/5b4da674/attachment.sig>


More information about the ffmpeg-devel mailing list