diff options
author | 2013-05-04 01:02:09 +0200 | |
---|---|---|
committer | 2013-05-06 23:11:11 +0200 | |
commit | 5148f9f5cca6a5a28bb98a3b713f27614538815f (patch) | |
tree | f861652cbe04412b92886beea838c0cfc5725899 | |
parent | 885c6a2610619ad3ee2b01ae7ec7670f8551d388 (diff) |
demux: remove retrieval of chapter end time
The frontend doesn't use this.
Also use double for returning the chapter times. Everything uses double
for times, and there's no reason to use float here.
-rw-r--r-- | core/mplayer.c | 2 | ||||
-rw-r--r-- | demux/demux.c | 4 | ||||
-rw-r--r-- | demux/demux.h | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/core/mplayer.c b/core/mplayer.c index a6cc189df6..7d657edb54 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -3249,7 +3249,7 @@ double chapter_start_time(struct MPContext *mpctx, int chapter) if (mpctx->chapters) return mpctx->chapters[chapter].start; if (mpctx->master_demuxer) - return demuxer_chapter_time(mpctx->master_demuxer, chapter, NULL); + return demuxer_chapter_time(mpctx->master_demuxer, chapter); return -1; } diff --git a/demux/demux.c b/demux/demux.c index e16933e729..94f54fcbfd 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1365,12 +1365,10 @@ char *demuxer_chapter_name(demuxer_t *demuxer, int chapter) return NULL; } -float demuxer_chapter_time(demuxer_t *demuxer, int chapter, float *end) +double demuxer_chapter_time(demuxer_t *demuxer, int chapter) { if (demuxer->num_chapters && demuxer->chapters && chapter >= 0 && chapter < demuxer->num_chapters) { - if (end) - *end = demuxer->chapters[chapter].end / 1e9; return demuxer->chapters[chapter].start / 1e9; } return -1.0; diff --git a/demux/demux.h b/demux/demux.h index 048ffb3934..886252fa85 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -408,8 +408,8 @@ double demuxer_get_start_time(struct demuxer *demuxer); int demuxer_get_current_chapter(struct demuxer *demuxer, double time_now); /// Get chapter name by index if available. char *demuxer_chapter_name(struct demuxer *demuxer, int chapter); -/// Get chapter start time and end time by index if available. -float demuxer_chapter_time(struct demuxer *demuxer, int chapter, float *end); +/// Get chapter start time by index if available. +double demuxer_chapter_time(struct demuxer *demuxer, int chapter); /// Get total chapter number. int demuxer_chapter_count(struct demuxer *demuxer); /// Get current angle index. |