Do not set mkv bit_depth to av_get_bytes_per_sample() for G.726.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 15 Jan 2014 22:35:22 +0000 (23:35 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 15 Jan 2014 22:35:22 +0000 (23:35 +0100)
The value is wrong and leads to broken files.

libavformat/matroskaenc.c

index 82624b7..11174f1 100644 (file)
@@ -620,7 +620,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;