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:26:00 +0100 |
commit | 2f4b781e4db5742bd85abfa1cc9e40af8c27b76b (patch) | |
tree | 37415b07f1827ea96352ac57c4c86fe0bd423cbc | |
parent | 0d45e821dc1445fe1f10d922a2ea9d999b5fb44f (diff) | |
download | ffmpeg-2f4b781e4db5742bd85abfa1cc9e40af8c27b76b.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 cafc96edbb..c5a6ddee96 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1906,6 +1906,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; |