[FFmpeg-cvslog] r18377 - trunk/libavformat/riff.c

cehoyos subversion
Wed Apr 8 18:01:11 CEST 2009


Author: cehoyos
Date: Wed Apr  8 18:01:10 2009
New Revision: 18377

Log:
Reduce code duplication.

Patch by Zhentan Feng, spyfeng gmail

Modified:
   trunk/libavformat/riff.c

Modified: trunk/libavformat/riff.c
==============================================================================
--- trunk/libavformat/riff.c	Wed Apr  8 14:37:29 2009	(r18376)
+++ trunk/libavformat/riff.c	Wed Apr  8 18:01:10 2009	(r18377)
@@ -352,10 +352,7 @@ int put_wav_header(ByteIOContext *pb, AV
         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){



More information about the ffmpeg-cvslog mailing list