diff options
author | wm4 <wm4@nowhere> | 2014-02-09 21:13:03 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-09 21:13:03 +0100 |
commit | 7aa3726c9acce93e10e69053f96a4338a1ece0b7 (patch) | |
tree | a7be813650907d1af45140a3144278fe45d567f1 /demux | |
parent | 4dbd5df174f323b2b4cd6048d8df38a6168ba73c (diff) |
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.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 5b30bc8d35..c7526a7421 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -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 { |