summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-09-02 20:48:45 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-09-02 20:48:45 +0000
commitdfce888f8a6bbd61c4e39b825efb168c1bc069a6 (patch)
tree52a2e05f7bfc3de3d9955cd6d50e04c3f69b7207 /libavformat/movenc.c
parent428626d5d1df3c29d94ef9f7794fabb67a7e1013 (diff)
correctly mux mpeg2 audio 13818-3 in mp4
Originally committed as revision 15156 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 1d96894075..3547618410 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -272,7 +272,13 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack *track) // Basic
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)