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-15 23:37:47 +0100 |
commit | 11329370770e5c982deece7d4eb4f2e95e725332 (patch) | |
tree | f83aeca26e76ccb409da87d7b3093802021da220 | |
parent | 565102dcac4959da60e6b1528dc31315d21194ca (diff) | |
download | ffmpeg-11329370770e5c982deece7d4eb4f2e95e725332.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.
-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 ae4dbf7b10..299cbd074e 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1909,6 +1909,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; |