mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 21:27:08 +00:00
demux_mkv: don't trust DefaultDuration for audio
It's used to interpolate timestamps for sub-packets ("block laces"). It's occasionally broken, and not really needed by us.
This commit is contained in:
parent
f0b15ad447
commit
503c6f7fd6
@ -1687,11 +1687,9 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track)
|
||||
sh_a->samplerate = 48000;
|
||||
}
|
||||
|
||||
// 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(codec, "ac3") == 0)
|
||||
track->default_duration = 0;
|
||||
// This field tends to be broken, and our decoder can interpolate the
|
||||
// missing timestamps anyway.
|
||||
track->default_duration = 0;
|
||||
|
||||
sh_a->extradata = extradata;
|
||||
sh_a->extradata_size = extradata_len;
|
||||
|
Loading…
Reference in New Issue
Block a user