Mercurial > libavformat.hg
changeset 3869:9288b207a184 libavformat
correctly mux mpeg2 audio 13818-3 in mp4
author | bcoudurier |
---|---|
date | Tue, 02 Sep 2008 20:48:45 +0000 |
parents | ea1573187fb8 |
children | 97a01cb166f5 |
files | movenc.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/movenc.c Tue Sep 02 19:13:25 2008 +0000 +++ b/movenc.c Tue Sep 02 20:48:45 2008 +0000 @@ -272,7 +272,13 @@ putDescr(pb, 0x04, 13 + decoderSpecificInfoLen); // Object type indication - put_byte(pb, codec_get_tag(ff_mp4_obj_type, track->enc->codec_id)); + if ((track->enc->codec_id == CODEC_ID_MP2 || + track->enc->codec_id == CODEC_ID_MP3) && + track->enc->sample_rate <= 24000 && + track->enc->sample_rate >= 16000) + put_byte(pb, 105); // 13818-3 + else + put_byte(pb, codec_get_tag(ff_mp4_obj_type, track->enc->codec_id)); // the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio) // plus 1 bit to indicate upstream and 1 bit set to 1 (reserved)