[vlc-commits] bluray: make title transitions faster

Petri Hintukainen git at videolan.org
Tue Dec 1 13:39:47 CET 2015


vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Tue Dec  1 13:14:14 2015 +0200| [0f234007b9bc20a33727c796b99548b051d14eb4] | committer: Jean-Baptiste Kempf

bluray: make title transitions faster

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f234007b9bc20a33727c796b99548b051d14eb4
---

 modules/access/bluray.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 8f62005..2135639 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -169,6 +169,7 @@ struct  demux_sys_t
     int                 i_video_stream;
     stream_t            *p_parser;
     bool                b_flushed;
+    bool                b_pl_playing;       /* true when playing playlist */
 
     /* Used to store bluray disc path */
     char                *psz_bd_path;
@@ -1948,6 +1949,13 @@ static void blurayHandleEvent(demux_t *p_demux, const BD_EVENT *e)
     case BD_EVENT_PLAYLIST:
         /* Start of playlist playback (?????.mpls) */
         blurayUpdatePlaylist(p_demux, e->param);
+        if (p_sys->b_pl_playing) {
+            /* previous playlist was stopped in middle. flush to avoid delay */
+            msg_Info(p_demux, "Stopping playlist playback");
+            blurayResetParser(p_demux);
+            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
+        }
+        p_sys->b_pl_playing = true;
         break;
     case BD_EVENT_PLAYITEM:
         blurayUpdateCurrentClip(p_demux, e->param);
@@ -2008,6 +2016,9 @@ static void blurayHandleEvent(demux_t *p_demux, const BD_EVENT *e)
         /* reset demuxer (partially decoded PES packets must be dropped) */
         blurayResetParser(p_demux);
         break;
+    case BD_EVENT_END_OF_TITLE:
+        p_sys->b_pl_playing = false;
+        break;
     case BD_EVENT_IDLE:
         /* nothing to do (ex. BD-J is preparing menus, waiting user input or running animation) */
         /* avoid busy loop (bd_read() returns no data) */



More information about the vlc-commits mailing list