[FFmpeg-cvslog] riff: use bps instead of bits_per_coded_sample in the WAVEFORMATEXTENSIBLE header

Justin Ruggles git at videolan.org
Wed Apr 18 00:41:39 CEST 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon Apr 16 12:14:25 2012 -0400| [8099fc763bb071ba56e3de49a2104c57985fa3d1] | committer: Justin Ruggles

riff: use bps instead of bits_per_coded_sample in the WAVEFORMATEXTENSIBLE header

This matches the value for the plain WAVEFORMATEX header.
Also fixes stream copy to WAVE for non-16-bit raw pcm.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8099fc763bb071ba56e3de49a2104c57985fa3d1
---

 libavformat/riff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 2b6165e..8a91345 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -482,7 +482,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
     if(waveformatextensible) {                                    /* write WAVEFORMATEXTENSIBLE extensions */
         hdrsize += 22;
         avio_wl16(pb, riff_extradata - riff_extradata_start + 22); /* 22 is WAVEFORMATEXTENSIBLE size */
-        avio_wl16(pb, enc->bits_per_coded_sample);                 /* ValidBitsPerSample || SamplesPerBlock || Reserved */
+        avio_wl16(pb, bps);                                        /* ValidBitsPerSample || SamplesPerBlock || Reserved */
         avio_wl32(pb, enc->channel_layout);                        /* dwChannelMask */
         avio_wl32(pb, enc->codec_tag);                             /* GUID + next 3 */
         avio_wl32(pb, 0x00100000);



More information about the ffmpeg-cvslog mailing list