diff options
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index d3e12f7190..a73c594371 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1587,6 +1587,12 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track) goto error; } + // Some files have broken default DefaultDuration set, which will lead to + // audio packets with incorrect timestamps. This follows FFmpeg commit + // 6158a3b, sample see FFmpeg ticket 2508. + if (sh_a->samplerate == 8000 && strcmp(track->codec_id, MKV_A_AC3) == 0) + track->default_duration = 0; + mp_set_audio_codec_from_tag(sh_a); return 0; |