[SCM] libav/experimental: Reduce code duplication.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:43:30 UTC 2013


The following commit has been merged in the experimental branch:
commit c81604f862a550bef5261680cfdc48deb6fce046
Author: Zhentan Feng <spyfeng at gmail.com>
Date:   Wed Apr 8 16:01:10 2009 +0000

    Reduce code duplication.
    
    Patch by Zhentan Feng, spyfeng gmail
    
    Originally committed as revision 18377 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/riff.c b/libavformat/riff.c
index aa33c09..3665176 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -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){

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list