demux_mkv: remove weird seeking semantics for audio

This skipped all audio packets before the first video key frame was
found. I'm not really sure why this would be needed; most likely it
isn't. So get rid of it. Even if audio packets are returned to the
player too soon, the player will sync the audio start to the video
start by decoding and discarding audio data.

Note that although the removed code was just added in the previous
commit, it merely kept the old keeping semantics which demux_mkv
always followed. This commit removes these special semantics.
This commit is contained in:
wm4 2014-02-09 21:13:03 +01:00
parent 4dbd5df174
commit 7aa3726c9a
1 changed files with 1 additions and 6 deletions

View File

@ -190,7 +190,7 @@ typedef struct mkv_demuxer {
int num_headers;
uint64_t skip_to_timecode;
int v_skip_to_keyframe, a_skip_to_keyframe, a_no_timecode_check;
int v_skip_to_keyframe, a_skip_to_keyframe;
int subtitle_preroll;
} mkv_demuxer_t;
@ -2351,8 +2351,6 @@ static int handle_block(demuxer_t *demuxer, struct block_info *block_info)
current_pts = tc / 1e9;
if (track->type == MATROSKA_TRACK_AUDIO) {
if (mkv_d->a_no_timecode_check)
use_this_block = !mkv_d->v_skip_to_keyframe;
if (mkv_d->a_skip_to_keyframe)
use_this_block &= keyframe;
} else if (track->type == MATROSKA_TRACK_SUBTITLE) {
@ -2739,9 +2737,6 @@ static void demux_mkv_seek(demuxer_t *demuxer, float rel_seek_secs, int flags)
mkv_d->v_skip_to_keyframe = st_active[STREAM_VIDEO];
mkv_d->a_skip_to_keyframe = st_active[STREAM_AUDIO];
// This is probably not needed, but can't be sure.
mkv_d->a_no_timecode_check = st_active[STREAM_VIDEO];
if (flags & SEEK_FORWARD) {
mkv_d->skip_to_timecode = target_timecode;
} else {