# HG changeset patch # User cehoyos # Date 1239206470 0 # Node ID 4b74f09970d0cde284d3ff472edf4a7064886c47 # Parent bf87d9ffb3ae82d4c2bbf0d1f511c320d286b4a2 Reduce code duplication. Patch by Zhentan Feng, spyfeng gmail diff -r bf87d9ffb3ae -r 4b74f09970d0 riff.c --- a/riff.c Wed Apr 08 07:16:14 2009 +0000 +++ b/riff.c Wed Apr 08 16:01:10 2009 +0000 @@ -352,10 +352,7 @@ 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){