[vlc-commits] bluray: shuffle/merge functions
Petri Hintukainen
git at videolan.org
Wed Feb 19 13:03:52 CET 2014
vlc | branch: master | Petri Hintukainen <phintuka at users.sourceforge.net> | Tue Feb 18 22:26:48 2014 +0200| [ea9687d4029afee0fa3c5d6a0a152b8a418767c9] | committer: Jean-Baptiste Kempf
bluray: shuffle/merge functions
Remove duplicate actions.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea9687d4029afee0fa3c5d6a0a152b8a418767c9
---
modules/access/bluray.c | 47 ++++++++++++++++++-----------------------------
1 file changed, 18 insertions(+), 29 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index c7e27b3..2c30706 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1195,34 +1195,6 @@ static void blurayResetParser(demux_t *p_demux)
msg_Err(p_demux, "Failed to create TS demuxer");
}
-static void blurayUpdateTitle(demux_t *p_demux, unsigned i_title)
-{
- blurayResetParser(p_demux);
- if (i_title >= p_demux->p_sys->i_title)
- return;
-
- /* read title info and init some values */
- p_demux->info.i_title = i_title;
- p_demux->info.i_seekpoint = 0;
- p_demux->info.i_update |= INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
-}
-
-static void blurayUpdatePlaylist(demux_t *p_demux, unsigned i_playlist)
-{
- blurayResetParser(p_demux);
-
- p_demux->p_sys->i_playlist = i_playlist;
- p_demux->p_sys->i_current_clip = 0;
-
- /* read title info and init some values */
- if (!p_demux->p_sys->b_menu)
- p_demux->info.i_title = bd_get_current_title(p_demux->p_sys->bluray);
- p_demux->info.i_seekpoint = 0;
- p_demux->info.i_update |= INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
-
- blurayUpdateTitleInfo(p_demux, p_demux->p_sys->pp_title[p_demux->info.i_title], -1, i_playlist);
-}
-
/*****************************************************************************
* bluraySetTitle: select new BD title
*****************************************************************************/
@@ -1260,7 +1232,8 @@ static int bluraySetTitle(demux_t *p_demux, int i_title)
msg_Err(p_demux, "cannot select bd title '%d'", i_title);
return VLC_EGENERIC;
}
- blurayUpdateTitle(p_demux, i_title);
+
+ blurayResetParser(p_demux);
return VLC_SUCCESS;
}
@@ -1461,6 +1434,22 @@ static void blurayStreamSelect(demux_t *p_demux, uint32_t i_type, uint32_t i_id)
}
}
+static void blurayUpdatePlaylist(demux_t *p_demux, unsigned i_playlist)
+{
+ blurayResetParser(p_demux);
+
+ p_demux->p_sys->i_playlist = i_playlist;
+ p_demux->p_sys->i_current_clip = 0;
+
+ /* read title info and init some values */
+ if (!p_demux->p_sys->b_menu)
+ p_demux->info.i_title = bd_get_current_title(p_demux->p_sys->bluray);
+ p_demux->info.i_seekpoint = 0;
+ p_demux->info.i_update |= INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
+
+ blurayUpdateTitleInfo(p_demux, p_demux->p_sys->pp_title[p_demux->info.i_title], -1, i_playlist);
+}
+
static void blurayUpdateCurrentClip(demux_t *p_demux, uint32_t clip)
{
if (clip == 0xFF)
More information about the vlc-commits
mailing list