diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-11-03 20:20:58 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-11-03 20:22:10 +0100 |
commit | a487378ef535d149cf2c8633c1f901d875d039ef (patch) | |
tree | e379a7e7895bb2c98f3bafe964ab620d3b7a22af | |
parent | 4eb86d348ff5bfa140e06a6d8017a0c762015a67 (diff) | |
download | ffmpeg-a487378ef535d149cf2c8633c1f901d875d039ef.tar.gz |
Set frame_size for AMR_NB in mov.
This copies the behaviour of the amr demuxer.
-rw-r--r-- | libavformat/mov.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 62d5b3ccdb..c90004cbae 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1350,10 +1350,13 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) st->codec->frame_size= sc->samples_per_frame; st->codec->channels= 1; /* really needed */ /* force sample rate for amr, stsd in 3gp does not store sample rate */ - if (st->codec->codec_id == CODEC_ID_AMR_NB) + if (st->codec->codec_id == CODEC_ID_AMR_NB) { st->codec->sample_rate = 8000; - else if (st->codec->codec_id == CODEC_ID_AMR_WB) + st->codec->frame_size = 160; + } else if (st->codec->codec_id == CODEC_ID_AMR_WB) { st->codec->sample_rate = 16000; + st->codec->frame_size = 320; + } break; case CODEC_ID_MP2: case CODEC_ID_MP3: |