[vlc-devel] [PATCH 1/5] bluray: shuffle/merge functions
Petri Hintukainen
phintuka at users.sourceforge.net
Tue Feb 18 21:26:48 CET 2014
Remove duplicate actions.
---
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)
--
1.8.3.2
More information about the vlc-devel
mailing list