diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-09-28 17:59:26 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-09-28 17:59:26 +0000 |
commit | 9770089d34f344fe8157d884a087f5aa20067cfb (patch) | |
tree | ae99431766dbff2afca854befc12e73f56c32baa /libavformat/mov.c | |
parent | e6f4c806e3097db777e92e4669f14d0c561e2251 (diff) | |
download | ffmpeg-9770089d34f344fe8157d884a087f5aa20067cfb.tar.gz |
move sample size adjusting code after audio stsd v2 parsing to let v2 set correct channel number, fix Sony-hdv2.mov
Originally committed as revision 6373 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 183abdceec..00ba5ebc45 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -985,12 +985,6 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) break; } - bits_per_sample = av_get_bits_per_sample(st->codec->codec_id); - if (bits_per_sample) { - st->codec->bits_per_sample = bits_per_sample; - sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; - } - //Read QT version 1 fields. In version 0 theese dont exist dprintf("version =%d mp4=%d\n",version,c->mp4); if(version==1) { @@ -1008,6 +1002,12 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) get_be32(pb); /* bytes per audio packet if constant */ get_be32(pb); /* lpcm frames per audio packet if constant */ } + + bits_per_sample = av_get_bits_per_sample(st->codec->codec_id); + if (bits_per_sample) { + st->codec->bits_per_sample = bits_per_sample; + sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; + } } else { /* other codec type, just skip (rtp, mp4s, tmcd ...) */ url_fskip(pb, size - (url_ftell(pb) - start_pos)); |