Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-11-15 16:41:05 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-08-04 20:18:08 +0300
commita67de68d6e9b860eeaecb0318c35e1f4a9495514 (patch)
treed2074c2e08b6bfc35325c189cabe96dc29c229e4
parentc98c5176cee6f616d74c9c7acf10f55e88f9c6e9 (diff)
matroskadec_haali: enable full parsing for MP3
This fixes decoding of split mp3 frames in mkv, and matches the behavior of the ffmpeg matroska demuxer.
-rw-r--r--libavformat/matroskadec_haali.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/matroskadec_haali.c b/libavformat/matroskadec_haali.c
index ba6b07a4ba..c9348081b5 100644
--- a/libavformat/matroskadec_haali.c
+++ b/libavformat/matroskadec_haali.c
@@ -1188,7 +1188,9 @@ static int mkv_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->sample_rate = (unsigned int)info->AV.Audio.OutputSamplingFreq;
st->codec->channels = info->AV.Audio.Channels;
- if (st->codec->codec_id != AV_CODEC_ID_AAC && st->codec->codec_id != AV_CODEC_ID_MLP && st->codec->codec_id != AV_CODEC_ID_TRUEHD)
+ if (st->codec->codec_id == AV_CODEC_ID_MP3)
+ st->need_parsing = AVSTREAM_PARSE_FULL;
+ else if (st->codec->codec_id != AV_CODEC_ID_AAC && st->codec->codec_id != AV_CODEC_ID_MLP && st->codec->codec_id != AV_CODEC_ID_TRUEHD)
st->need_parsing = AVSTREAM_PARSE_HEADERS;
if (track->info->CodecDelay > 0) {
st->codec->delay = av_rescale_q(track->info->CodecDelay, (AVRational){1, 1000000000}, (AVRational){1, st->codec->sample_rate});