diff options
author | Mark Himsley <mark@mdsh.com> | 2013-11-01 11:22:53 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2014-05-03 12:06:08 -0400 |
commit | b5f92f9603c2b46c37b20134e9e2338805844f0f (patch) | |
tree | ebf4786d86ebacc43f28b08a6d4986045f81fb7a | |
parent | 42a8d326978f6cf64fdc6deec8a3d91e5e1eaf07 (diff) | |
download | ffmpeg-b5f92f9603c2b46c37b20134e9e2338805844f0f.tar.gz |
isom: lpcm in mov default to big endian
It is my understanding that "Unless otherwise stated, all data in a
QuickTime movie is stored in big-endian byte ordering" [1] in MOV files.
I have a couple of thousand files, which technically are invalid because
their sound sample description element 4CC is 'lpcm' but its version is
0 - and "Version 0 supports only uncompressed audio in raw ('raw ') or
twos-complement ('twos') format" [2]
Because isom.c only contains a mapping for 4CC 'lpcm' to
AV_CODEC_ID_PCM_S16LE, these files have their audio decoded as LE when
it is actually BE.
This commit adds AV_CODEC_ID_PCM_S16BE as the first match for 4CC 'lpcm'.
[1]
https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
page 21
[2]
https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
page 178
Reviewed-by: Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
(cherry picked from commit 360022bd3b894cc01ea112b275fa4c8f53881808)
(cherry picked from commit d37fac6dbbdddb76225aa691b83ffd9a0c7dae6b)
-rw-r--r-- | libavformat/isom.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c index c9b894fd15..b016686d7a 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -259,6 +259,7 @@ const AVCodecTag ff_codec_movaudio_tags[] = { { AV_CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') }, { AV_CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') }, { AV_CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') }, + { AV_CODEC_ID_PCM_S16BE, MKTAG('l', 'p', 'c', 'm') }, { AV_CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') }, { AV_CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') }, { AV_CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') }, |