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

bcoudurier subversion
Sun Sep 7 06:17:15 CEST 2008


Author: bcoudurier
Date: Sun Sep  7 06:17:15 2008
New Revision: 15239

Log:
set default bps to 16 in wav header

Modified:
   trunk/libavformat/riff.c

Modified: trunk/libavformat/riff.c
==============================================================================
--- trunk/libavformat/riff.c	(original)
+++ trunk/libavformat/riff.c	Sun Sep  7 06:17:15 2008
@@ -248,7 +248,8 @@ int put_wav_header(ByteIOContext *pb, AV
     } else if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV || enc->codec_id == CODEC_ID_ADPCM_MS || enc->codec_id == CODEC_ID_ADPCM_G726 || enc->codec_id == CODEC_ID_ADPCM_YAMAHA) { //
         bps = 4;
     } else {
-        bps = av_get_bits_per_sample(enc->codec_id);
+        if (!(bps = av_get_bits_per_sample(enc->codec_id)))
+            bps = 16; // default to 16
     }
     if(bps != enc->bits_per_sample && enc->bits_per_sample){
         av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps);




More information about the ffmpeg-cvslog mailing list