1
0
Fork 0

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.
This commit is contained in:
Hendrik Leppkes 2015-11-15 14:41:05 +01:00
parent fe15f4466a
commit 7d9afeb0a2
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 3 additions and 1 deletions

View File

@ -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});