diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-15 23:37:47 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-16 00:28:49 +0100 |
commit | 30147f14d4b6d8c6232a0f8162b89b4173ee9400 (patch) | |
tree | 11ad45d99e12441c8fd499add449eedd5e9a4f3a | |
parent | d6a705d7787ff10848de5533eee0bc61c40ea272 (diff) | |
download | ffmpeg-30147f14d4b6d8c6232a0f8162b89b4173ee9400.tar.gz |
Do not read mkv audio bit_depth if bits_per_coded_sample is already set.
This allows decoding broken mkv files containing G.726 audio.
(cherry picked from commit 11329370770e5c982deece7d4eb4f2e95e725332)
-rw-r--r-- | libavformat/matroskadec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index f97e239a73..ebad0d51b9 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1812,6 +1812,7 @@ static int matroska_read_header(AVFormatContext *s) st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->sample_rate = track->audio.out_samplerate; st->codec->channels = track->audio.channels; + if (!st->codec->bits_per_coded_sample) st->codec->bits_per_coded_sample = track->audio.bitdepth; if (st->codec->codec_id != AV_CODEC_ID_AAC) st->need_parsing = AVSTREAM_PARSE_HEADERS; |