[FFmpeg-devel] [PATCH 0/1] avformat: mca: relax a condition check to be able to play

liushuyu at aosc.io liushuyu at aosc.io
Fri Oct 2 08:53:35 EEST 2020


From: liushuyu <liushuyu at aosc.io>

In certain mca files, the coefficient table is in the data section
instead of the header section. In this case, the coefficient offset
relative to the header ending marker is a negative value thus failing
the original condition check at line 146.

The new check just check if the coefficient offset is within the file
range (since there is no way to know where the actual audio samples are
without the correct header information).

I have also prepared some sample files for you to test:
(Coefficient in data section) 
https://streams.videolan.org/ffmpeg/incoming/bgm_pot_metal_a1_a_1632.mca

And at last, I found some old samples that uses older MCA container
format:
(MCA Version 3) https://streams.videolan.org/ffmpeg/incoming/s_bgm_4b_DownMix.mca

liushuyu (1):
  avformat: mca: relax a condition check to be able to play certain
    files

 libavformat/mca.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.28.0


More information about the ffmpeg-devel mailing list