mirror of
https://github.com/mpv-player/mpv
synced 2025-01-18 21:31:13 +00:00
demux_mkv: seek: fix bogus audio packet from earlier position
Due to a bug created back in 2006 when SimpleBlock support was added, demux_mkv demuxed one audio packet from the initial file position after a seek, then skipped the following ones until a video keyframe was found. This wasn't very noticeable earlier, but it had bad effects after the recently added -initial-audio-sync code as the extra packet with an earlier timestamp confused timing calculations and resulted in desync after seeking. Fix.
This commit is contained in:
parent
0478f1a29f
commit
721803c631
@ -2191,7 +2191,8 @@ static int handle_block(demuxer_t *demuxer, uint8_t *block, uint64_t length,
|
||||
use_this_block = 0;
|
||||
} else if (block_bref != 0)
|
||||
use_this_block = 0;
|
||||
} else if (mkv_d->v_skip_to_keyframe)
|
||||
}
|
||||
if (mkv_d->v_skip_to_keyframe)
|
||||
use_this_block = 0;
|
||||
|
||||
if (track->fix_i_bps && use_this_block) {
|
||||
|
Loading…
Reference in New Issue
Block a user