Commit 5889121f authored by bcoudurier's avatar bcoudurier

simplify, amr.c sets frame_size to 160, and sample size is always 8000


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5359 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8effc7c4
...@@ -1425,17 +1425,9 @@ static int mov_write_moov_tag(ByteIOContext *pb, MOVContext *mov, ...@@ -1425,17 +1425,9 @@ static int mov_write_moov_tag(ByteIOContext *pb, MOVContext *mov,
if(mov->tracks[i].enc->codec_type == CODEC_TYPE_VIDEO) { if(mov->tracks[i].enc->codec_type == CODEC_TYPE_VIDEO) {
mov->tracks[i].timescale = mov->tracks[i].enc->time_base.den; mov->tracks[i].timescale = mov->tracks[i].enc->time_base.den;
mov->tracks[i].sampleDuration = mov->tracks[i].enc->time_base.num; mov->tracks[i].sampleDuration = mov->tracks[i].enc->time_base.num;
} } else if(mov->tracks[i].enc->codec_type == CODEC_TYPE_AUDIO) {
else if(mov->tracks[i].enc->codec_type == CODEC_TYPE_AUDIO) { mov->tracks[i].timescale = mov->tracks[i].enc->sample_rate;
/* If AMR, track timescale = 8000, AMR_WB = 16000 */ mov->tracks[i].sampleDuration = mov->tracks[i].enc->frame_size;
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;
}
} }
mov->tracks[i].trackDuration = mov->tracks[i].trackDuration =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment