From 2c693a47328a4faa9581a792c24448407629279b Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 25 Mar 2014 01:38:18 +0100 Subject: 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. --- player/playloop.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'player') 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; } -- cgit v1.2.3