From 2f004875d3bc0b951e04b203a5bcc818faccf065 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 26 Apr 2013 19:19:34 +0000 Subject: stream_bluray: fix querying current chapter br://: Fix querying current chapter. This also fixes specifying an end chapter via -chapter. Based on patch by Olivier Rolland [billl users.sourceforge.net] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36173 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_bluray.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'stream/stream_bluray.c') diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c index 8ee69aaa80..0cc1152310 100644 --- a/stream/stream_bluray.c +++ b/stream/stream_bluray.c @@ -55,7 +55,6 @@ int bluray_chapter = 0; struct bluray_priv_s { BLURAY *bd; int current_angle; - int current_chapter; int current_title; }; @@ -135,7 +134,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg) } case STREAM_CTRL_GET_CURRENT_CHAPTER: { - *((unsigned int *) arg) = b->current_chapter; + *((unsigned int *) arg) = bd_get_current_chapter(b->bd); return 1; } @@ -358,7 +357,6 @@ err_no_info: b = calloc(1, sizeof(struct bluray_priv_s)); b->bd = bd; b->current_angle = angle; - b->current_chapter = chapter; b->current_title = title; s->start_pos = chapter_pos; -- cgit v1.2.3 From daee1a04e7eea66f820934368371c6e2b8c759ba Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 26 Apr 2013 19:50:19 +0000 Subject: stream_bluray: remove the broken -bluray-chapter option Remove the broken -bluray-chapter option. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36175 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: DOCS/man/en/mplayer.1 cfg-common.h --- stream/stream_bluray.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'stream/stream_bluray.c') diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c index 0cc1152310..81fd882f86 100644 --- a/stream/stream_bluray.c +++ b/stream/stream_bluray.c @@ -50,7 +50,6 @@ char *bluray_device = NULL; int bluray_angle = 0; -int bluray_chapter = 0; struct bluray_priv_s { BLURAY *bd; @@ -246,9 +245,8 @@ static int bluray_stream_open(stream_t *s, int mode, int title, title_guess, title_count; uint64_t title_size; - unsigned int chapter = 0, angle = 0; + unsigned int angle = 0; uint64_t max_duration = 0; - int64_t chapter_pos = 0; char *device = NULL; int i; @@ -327,16 +325,6 @@ static int bluray_stream_open(stream_t *s, int mode, if (!info) goto err_no_info; - /* Select chapter */ - chapter = bluray_chapter ? bluray_chapter : BLURAY_DEFAULT_CHAPTER; - chapter = FFMIN(chapter, info->chapter_count); - - if (chapter) - chapter_pos = bd_chapter_pos(bd, chapter); - - mp_msg(MSGT_IDENTIFY, MSGL_INFO, - "ID_BLURAY_CURRENT_CHAPTER=%d\n", chapter + 1); - /* Select angle */ angle = bluray_angle ? bluray_angle : BLURAY_DEFAULT_ANGLE; angle = FFMIN(angle, info->angle_count); @@ -359,7 +347,6 @@ err_no_info: b->current_angle = angle; b->current_title = title; - s->start_pos = chapter_pos; s->end_pos = title_size; s->sector_size = BLURAY_SECTOR_SIZE; s->flags = mode | MP_STREAM_SEEK; -- cgit v1.2.3