summaryrefslogtreecommitdiffstats
path: root/subopt-helper.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-02-26 21:12:53 +0100
committerwm4 <wm4@mplayer2.org>2012-02-26 21:29:03 +0100
commit021d012c9782dbbfc876f69b9f150754d5bbeb72 (patch)
tree6fe7f034b4a696d3968aa2b6f86007f564cbaf64 /subopt-helper.c
parent8a10f587fc03f5e6368aa3eea418774351dbf0ac (diff)
downloadmpv-021d012c9782dbbfc876f69b9f150754d5bbeb72.tar.bz2
mpv-021d012c9782dbbfc876f69b9f150754d5bbeb72.tar.xz
core: sort chapters
Ensure that chapters are sorted by time. There are some broken mkv files that have chapters in random order. Using simple chapter skipping with the seek_chapter slave command is very confusing and just doesn't work if the chapters are not in order. The chapters are resorted every time a chapter is added, that would make the chapter list unsorted. While this is algorithmically very stupid, it doesn't require changes per demuxer, or reasoning when exactly chapters could be added. Turning this into an insertion sort isn't worth the code, and the added demuxer_sort_chapters() function could possibly be moved to the "right" place later. This is not done when ordered chapters are used, because timeline support uses different data structures for chapters.
Diffstat (limited to 'subopt-helper.c')
0 files changed, 0 insertions, 0 deletions