[FFmpeg-devel] [PATCH 2/2] riffdec: override bits per sample for G.729 as well

Ganesh Ajjanagadde gajjanagadde at gmail.com
Wed Jul 29 06:28:47 CEST 2015


May be used to fix Ticket4577

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavformat/riffdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index 7eecdb2..43d4cfc 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -176,8 +176,8 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,
         codec->channels    = 0;
         codec->sample_rate = 0;
     }
-    /* override bits_per_coded_sample for G.726 */
-    if (codec->codec_id == AV_CODEC_ID_ADPCM_G726 && codec->sample_rate)
+    /* override bits_per_coded_sample for G.726  and G.729 */
+    if ((codec->codec_id == AV_CODEC_ID_ADPCM_G726 || codec->codec_id == AV_CODEC_ID_G729) && codec->sample_rate)
         codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate;
 
     return 0;
-- 
2.5.0



More information about the ffmpeg-devel mailing list