[FFmpeg-devel] lpcm in mov default to big endian

Michael Niedermayer michaelni at gmx.at
Fri Nov 1 19:46:00 CET 2013


On Fri, Nov 01, 2013 at 11:45:02PM +0900, Yusuke Nakamura wrote:
> 2013/11/1 Mark Himsley <mark at mdsh.com>
> 
> > 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.
> >
> > Attached patch adds AV_CODEC_ID_PCM_S16BE as the first match for 4CC
> > 'lpcm'.
> >
> > This is not tested for regressions in fate, but makes 4CC 'lpcm' match
> > many other 4CCs in isom.c, and makes my files decode correctly.
> >
> > Please comment.
> >
> > [1] https://developer.apple.com/**library/mac/documentation/**
> > quicktime/QTFF/qtff.pdf<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<https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf>page 178
> >
> > --
> > Mark
> >
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >
> 
> The patch itself, LGTM.

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131101/0f49ab74/attachment.asc>


More information about the ffmpeg-devel mailing list