Mercurial > libavformat.hg
changeset 1074:829b55eb168c libavformat
simplify, amr.c sets frame_size to 160, and sample size is always 8000
author | bcoudurier |
---|---|
date | Wed, 10 May 2006 18:00:16 +0000 |
parents | 61acaf09a437 |
children | f125be9d18e2 |
files | movenc.c |
diffstat | 1 files changed, 3 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/movenc.c Wed May 10 17:56:39 2006 +0000 +++ b/movenc.c Wed May 10 18:00:16 2006 +0000 @@ -1425,17 +1425,9 @@ 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 =