aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-06-19 11:28:28 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-06-19 11:28:28 +0000
commitaa1c1c615aa922e1f5867b3143278580d2b43bc6 (patch)
tree11a62a122d506fa4f48aa09572e14f5073dd0c74 /libavformat/movenc.c
parent7b49ce2e344a5f8864d8365d57f3c6c743f0c8f7 (diff)
downloadffmpeg-aa1c1c615aa922e1f5867b3143278580d2b43bc6.tar.gz
fix aac in mov for ipod
Originally committed as revision 5498 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5920141173..9381798b5f 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -323,6 +323,10 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack* track)
put_le32(pb, track->tag);
if (track->enc->codec_id == CODEC_ID_AAC) {
+ /* useless atom needed by mplayer, ipod, not needed by quicktime */
+ put_be32(pb, 12); /* size */
+ put_tag(pb, "mp4a");
+ put_be32(pb, 0);
mov_write_esds_tag(pb, track);
} else if (track->enc->codec_id == CODEC_ID_PCM_S24LE ||
track->enc->codec_id == CODEC_ID_PCM_S32LE) {
@@ -394,10 +398,14 @@ static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track)
if(version == 1) {
/* SoundDescription V1 extended info */
- put_be32(pb, track->enc->frame_size); /* Samples per packet */
- put_be32(pb, track->sampleDuration); /* Bytes per frame */
- put_be32(pb, 8); /* Bytes per sample */
- put_be32(pb, 2);
+ put_be32(pb, track->enc->frame_size); /* Samples per packet */
+ /* Parameters tested on quicktime 6.5, 7 */
+ put_be32(pb, 1); /* Bytes per packet */
+ /* FIXME not correct */
+ /* 8 is the min value needed for in32 to work with quicktime 6.5 */
+ /* Value ignored by other codecs currently supported (others might need it) */
+ put_be32(pb, 8); /* Bytes per frame */
+ put_be32(pb, 2); /* Bytes per sample */
}
if(track->mode == MODE_MOV &&