aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-05-10 18:00:16 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-05-10 18:00:16 +0000
commitb451719e07a0bc10ae879a0959483b4ac2ff7017 (patch)
treee9f06deb24eaf1d94b8e74e44eba69f09a0733fb /libavformat
parent9c09db541e29758486cb0a5006ab828db3dc6871 (diff)
downloadffmpeg-b451719e07a0bc10ae879a0959483b4ac2ff7017.tar.gz
simplify, amr.c sets frame_size to 160, and sample size is always 8000
Originally committed as revision 5359 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 684a37790e..26ee17115f 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1425,17 +1425,9 @@ static int mov_write_moov_tag(ByteIOContext *pb, MOVContext *mov,
if(mov->tracks[i].enc->codec_type == CODEC_TYPE_VIDEO) {
mov->tracks[i].timescale = mov->tracks[i].enc->time_base.den;
mov->tracks[i].sampleDuration = mov->tracks[i].enc->time_base.num;
- }
- else if(mov->tracks[i].enc->codec_type == CODEC_TYPE_AUDIO) {
- /* If AMR, track timescale = 8000, AMR_WB = 16000 */
- if(mov->tracks[i].enc->codec_id == CODEC_ID_AMR_NB) {
- mov->tracks[i].sampleDuration = 160; // Bytes per chunk
- mov->tracks[i].timescale = 8000;
- }
- else {
- mov->tracks[i].timescale = mov->tracks[i].enc->sample_rate;
- mov->tracks[i].sampleDuration = mov->tracks[i].enc->frame_size;
- }
+ } else if(mov->tracks[i].enc->codec_type == CODEC_TYPE_AUDIO) {
+ mov->tracks[i].timescale = mov->tracks[i].enc->sample_rate;
+ mov->tracks[i].sampleDuration = mov->tracks[i].enc->frame_size;
}
mov->tracks[i].trackDuration =