Reduce code duplication.
authorZhentan Feng <spyfeng@gmail.com>
Wed, 8 Apr 2009 16:01:10 +0000 (16:01 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Wed, 8 Apr 2009 16:01:10 +0000 (16:01 +0000)
Patch by Zhentan Feng, spyfeng gmail

Originally committed as revision 18377 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/riff.c

index aa33c09..3665176 100644 (file)
@@ -352,10 +352,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
         bytestream_put_le16(&riff_extradata, 16);                         /* fwHeadFlags */
         bytestream_put_le32(&riff_extradata, 0);                          /* dwPTSLow */
         bytestream_put_le32(&riff_extradata, 0);                          /* dwPTSHigh */
-    } else if (enc->codec_id == CODEC_ID_GSM_MS) {
-        hdrsize += 2;
-        bytestream_put_le16(&riff_extradata, enc->frame_size); /* wSamplesPerBlock */
-    } else if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
+    } else if (enc->codec_id == CODEC_ID_GSM_MS || enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
         hdrsize += 2;
         bytestream_put_le16(&riff_extradata, enc->frame_size); /* wSamplesPerBlock */
     } else if(enc->extradata_size){