[FFmpeg-cvslog] Do not set mkv bit_depth to av_get_bytes_per_sample() for G.726.

Carl Eugen Hoyos git at videolan.org
Thu Jan 16 00:29:53 CET 2014


ffmpeg | branch: release/2.1 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Jan 15 23:35:22 2014 +0100| [0d45e821dc1445fe1f10d922a2ea9d999b5fb44f] | committer: Carl Eugen Hoyos

Do not set mkv bit_depth to av_get_bytes_per_sample() for G.726.

The value is wrong and leads to broken files.
(cherry picked from commit 565102dcac4959da60e6b1528dc31315d21194ca)

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

 libavformat/matroskaenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 60b6e5e..ea45d9c 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -612,7 +612,7 @@ static int mkv_write_tracks(AVFormatContext *s)
             continue;
         }
 
-        if (!bit_depth)
+        if (!bit_depth && codec->codec_id != AV_CODEC_ID_ADPCM_G726)
             bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3;
         if (!bit_depth)
             bit_depth = codec->bits_per_coded_sample;



More information about the ffmpeg-cvslog mailing list