do not write wave if not needed
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 13 May 2006 22:25:17 +0000 (22:25 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 13 May 2006 22:25:17 +0000 (22:25 +0000)
Originally committed as revision 5377 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/movenc.c

index cb9e315..3502455 100644 (file)
@@ -399,7 +399,11 @@ static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track)
         put_be32(pb, 2);
     }
 
         put_be32(pb, 2);
     }
 
-    if(track->mode == MODE_MOV)
+    if(track->mode == MODE_MOV &&
+       (track->enc->codec_id == CODEC_ID_AAC ||
+        track->enc->codec_id == CODEC_ID_AMR_NB ||
+        track->enc->codec_id == CODEC_ID_PCM_S24LE ||
+        track->enc->codec_id == CODEC_ID_PCM_S32LE))
         mov_write_wave_tag(pb, track);
     else if(track->enc->codec_id == CODEC_ID_AAC)
         mov_write_esds_tag(pb, track);
         mov_write_wave_tag(pb, track);
     else if(track->enc->codec_id == CODEC_ID_AAC)
         mov_write_esds_tag(pb, track);