summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-25 01:38:18 +0100
committerwm4 <wm4@nowhere>2014-03-25 01:38:18 +0100
commit2c693a47328a4faa9581a792c24448407629279b (patch)
tree4f98655f55f9213ce6258c81cf6ac55b9be06463 /player
parent7bd3f2648152d41db9a9d3f479358d0d8f38b210 (diff)
downloadmpv-2c693a47328a4faa9581a792c24448407629279b.tar.bz2
mpv-2c693a47328a4faa9581a792c24448407629279b.tar.xz
stream: remove old chapter handling code
Stream-level chapters (like DVD etc.) did potentially not have timestamps for each chapter, so STREAM_CTRL_SEEK_TO_CHAPTER and STREAM_CTRL_GET_CURRENT_CHAPTER were needed to navigate chapters. We've switched everything to use timestamps and that seems to work, so we can simplify the code and remove this old mechanism.
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/player/playloop.c b/player/playloop.c
index e2f6a14de8..546d2e4cf8 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -570,8 +570,7 @@ int get_chapter_count(struct MPContext *mpctx)
return 0;
}
-// Seek to a given chapter. Tries to queue the seek, but might seek immediately
-// in some cases. Returns success, no matter if seek is queued or immediate.
+// Seek to a given chapter. Queues the seek.
bool mp_seek_chapter(struct MPContext *mpctx, int chapter)
{
int num = get_chapter_count(mpctx);
@@ -592,12 +591,6 @@ bool mp_seek_chapter(struct MPContext *mpctx, int chapter)
} else if (mpctx->master_demuxer) {
int res = demuxer_seek_chapter(mpctx->master_demuxer, chapter, &pts);
if (res >= 0) {
- if (pts == -1) {
- // for DVD/BD - seek happened via stream layer
- seek_reset(mpctx, true, true);
- mpctx->seek = (struct seek_params){0};
- return true;
- }
chapter = res;
goto do_seek;
}