Opened 5 years ago

Closed 5 years ago

#4251 closed defect (worksforme)

libavformat mis-identifies Quicktime file with 32-bit PCM audio and version 1 STSD table

Reported by: Richard42 Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Apple's Quicktime format supports 3 different versions of the Sample Table Description header for audio tracks. For uncompressed audio, Version 0 only supports 8 and 16-bit sample depths. Version 1 supports higher fidelity (24-bit and 32-bit per sample), but in a very confusing way.

I ran across an MOV file which contains 32-bit PCM audio, but libavformat (and ffmpeg, and VLC, and our software which uses libav) mis-identifies it as 16-bit audio.

I created a patch which fixes this defect in libavformat by handling this very narrow MOV parsing case. I will attach a sample MOV file which fails to parse properly with the current libav code, and my proposed patch which correctly handles this file.

Attachments (1)

libavformat-quicktime-32bit-audio-fix.diff (1.7 KB) - added by Richard42 5 years ago.
avformat code patch to fix parsing error

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by Richard42

avformat code patch to fix parsing error

comment:1 Changed 5 years ago by Richard42

The 2.5MB upload file size limit is unfortunate. Instead of attaching the test MOV file, I have uploaded it to my website. You can downloaded it here:

comment:2 Changed 5 years ago by michael

  • Resolution set to worksforme
  • Status changed from new to closed

cannot reproduce, please try recent ffmpeg

Note: See TracTickets for help on using tickets.