mbox series

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

Message ID 20201002055336.38476-1-liushuyu@aosc.io
Headers show
Series avformat: mca: relax a condition check to be able to play | expand

Message

liushuyu@aosc.io Oct. 2, 2020, 5:53 a.m. UTC
From: liushuyu <liushuyu@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(-)