diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-02 03:45:23 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-02 03:45:23 +0000 |
commit | aaef2bb345518dd62bfb415932bea824bbd48509 (patch) | |
tree | 6e5edbe798fe78983341328a563ba752a6c4c834 /libavformat/mov.c | |
parent | 6b477e1b712a785dbbdd9974668a82a1490a16e4 (diff) | |
download | ffmpeg-aaef2bb345518dd62bfb415932bea824bbd48509.tar.gz |
support big endian lpcm with audio stsd v2
Originally committed as revision 14507 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 4d156c7cdf..74c7a7ceef 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -832,7 +832,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) } else st->codec->palctrl = NULL; } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) { - int bits_per_sample; + int bits_per_sample, flags; uint16_t version = get_be16(pb); st->codec->codec_id = id; @@ -862,9 +862,11 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) st->codec->channels = get_be32(pb); get_be32(pb); /* always 0x7F000000 */ st->codec->bits_per_sample = get_be32(pb); /* bits per channel if sound is uncompressed */ - get_be32(pb); /* lcpm format specific flag */ + flags = get_be32(pb); /* lcpm format specific flag */ sc->bytes_per_frame = get_be32(pb); /* bytes per audio packet if constant */ sc->samples_per_frame = get_be32(pb); /* lpcm frames per audio packet if constant */ + if (flags & 2) // big endian + st->codec->codec_id = CODEC_ID_PCM_S16BE; } } |