[FFmpeg-devel] [PATCH] lavf/mov: Fix PCM audio w/ bit depth > 16

John Stebbins stebbins at jetheaddev.com
Fri Aug 31 18:58:33 EEST 2018


On 08/30/2018 04:43 PM, Michael Niedermayer wrote:
> On Mon, Aug 27, 2018 at 12:59:28PM -0700, John Stebbins wrote:
>> This type of audio is defined by the QT spec, but can be found in
>> non-QT branded files in the wild.
>>
>> Fixes ticket #7376
>> ---
>>  libavformat/mov.c | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
> So IIUC this is supporting a case that is slightly violating the spec ?
> Iam asking as i was wondering if it makes sense to check a few more
> things. For example the size could be checked if it actually is
> large enough to contain a version=1 header
>
> either way i think this patch should be ok
>
>

Yes, your understanding is correct.

I don't think the size can be used here because it includes the sizes of any other atoms that are contained in the stsd
entry.  It might be possible to sanity check some of the version qt version 1 (or 2) values read and rewind the stream
if they don't make sense (i.e. extreme values).  Or the following data could first be read as if it were *not* qt
version 1 and checked if it made sense (i.e. looked like the start of an atom), then rewind.

Unfortunately, the audio actually plays correctly if you just drop the qt version 1 data on the floor.  So it's not
necessary for playback which means someone could create yet another spec violating sample that has 24 bit pcm but muxed
using isom version 1 instead.  If anything like this exists in the wild, it would be necessary to perform heuristic
sanity checking of values I think.

-- 
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180831/66ec793e/attachment.sig>


More information about the ffmpeg-devel mailing list