]> git.sesse.net Git - ffmpeg/commit
avformat/matroskadec: Add a workaround for missing WavPack extradata
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 14 Dec 2019 00:36:54 +0000 (01:36 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 2 Apr 2020 05:12:01 +0000 (07:12 +0200)
commit048bc3fe31502e0fa5ba115cc91611a72c8fec2e
tree804d47d6b8acde136663fe7f8f904167b713af69
parentad91cf1f2f5793db5c6dd7ab9947fcc6d7832607
avformat/matroskadec: Add a workaround for missing WavPack extradata

mkvmerge versions 6.2 to 40.0 had a bug that made it not propagate the
WavPack extradata (containing the WavPack version) during remuxing from
a Matroska file; currently our demuxer would treat every WavPack block
encountered as invalid data (unless the WavPack stream is to be
discarded (i.e. the streams discard is >= AVDISCARD_ALL)) and try to
resync to the next level 1 element.

Luckily, the WavPack version is currently not really important; so we
fix this problem by assuming a version. David Bryant, the creator of
WavPack, recommended using version 0x410 (the most recent version) for
this. And this is what this commit does.

A FATE-test for this has been added.

Reviewed-by: David Bryant <david@wavpack.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/matroskadec.c
tests/fate/matroska.mak
tests/ref/fate/matroska-wavpack-missing-codecprivate [new file with mode: 0644]