diff options
author | Ilya Tumaykin <itumaykin@gmail.com> | 2016-04-12 13:06:04 +0300 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-04-12 18:33:35 +0000 |
commit | 2b9a83e615e5bcb728dd0421348381402678bf97 (patch) | |
tree | 5b9373de24153f8e6705c2efb8d4bf153b838213 /media-video/mpv/files | |
parent | kde-plasma/user-manager: Raise depdendency on dev-libs/libpwquality (diff) | |
download | gentoo-2b9a83e615e5bcb728dd0421348381402678bf97.tar.gz gentoo-2b9a83e615e5bcb728dd0421348381402678bf97.tar.bz2 gentoo-2b9a83e615e5bcb728dd0421348381402678bf97.zip |
media-video/mpv: verbump to 0.17.0
Package-Manager: portage-2.2.28
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'media-video/mpv/files')
-rw-r--r-- | media-video/mpv/files/mpv-0.17.0-fix-seeking-without-first-index-entry.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/media-video/mpv/files/mpv-0.17.0-fix-seeking-without-first-index-entry.patch b/media-video/mpv/files/mpv-0.17.0-fix-seeking-without-first-index-entry.patch new file mode 100644 index 000000000000..82c6d37c6f49 --- /dev/null +++ b/media-video/mpv/files/mpv-0.17.0-fix-seeking-without-first-index-entry.patch @@ -0,0 +1,42 @@ +commit f4142ab9ad1d929b60ff134754f482754b63043a +Author: wm4 <wm4@nowhere> +Date: Tue Apr 12 15:41:44 2016 +0200 + +demux_mkv: fix seeking with files that miss the first index entry + +Now it will always be able to seek back to the start, even if the index +is sparse or misses the first entry. + +This can be achieved by reusing the logic for incremental index +generation (for files with no index), and start time probing (for making +sure the first block is always indexed). +--- + +diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c +index b0a910b..210f4d6 100644 +--- a/demux/demux_mkv.c ++++ b/demux/demux_mkv.c +@@ -773,8 +773,9 @@ static int demux_mkv_read_cues(demuxer_t *demuxer) + if (cues.n_cue_point <= 3) // probably too sparse and will just break seeking + goto done; + +- // Discard incremental index. +- mkv_d->num_indexes = 0; ++ // Discard incremental index. (Keep the first entry, which must be the ++ // start of the file - helps with files that miss the first index entry.) ++ mkv_d->num_indexes = MPMIN(1, mkv_d->num_indexes); + mkv_d->index_has_durations = false; + + for (int i = 0; i < cues.n_cue_point; i++) { +@@ -2963,8 +2964,10 @@ static void probe_first_timestamp(struct demuxer *demuxer) + return; + + struct block_info block; +- if (read_next_block(demuxer, &block) > 0) ++ if (read_next_block(demuxer, &block) > 0) { ++ index_block(demuxer, &block); + mkv_d->tmp_block = block; ++ } + + demuxer->start_time = mkv_d->cluster_tc / 1e9; + |