[vlc-commits] dvdnav: cancel still frame on title selection

Francois Cartegnie git at videolan.org
Mon Jul 25 20:51:32 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul 25 19:56:05 2016 +0200| [f6939593507d7bd217a40b39b2983137b4485026] | committer: RĂ©mi Denis-Courmont

dvdnav: cancel still frame on title selection

According to documentation, the infinite still
frame should be canceled on user action (nav packet),
but it never does if using titles controls.

Fixes root menu 100% still frame -> title transition

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

 modules/access/dvdnav.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 0a7b550..f37f80e 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -634,14 +634,23 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_SET_TITLE:
             i = (int)va_arg( args, int );
-            if( ( i == 0 && dvdnav_menu_call( p_sys->dvdnav, DVD_MENU_Root )
-                  != DVDNAV_STATUS_OK ) ||
-                ( i != 0 && dvdnav_title_play( p_sys->dvdnav, i )
-                  != DVDNAV_STATUS_OK ) )
+            if( i == 0 && dvdnav_menu_call( p_sys->dvdnav, DVD_MENU_Root )
+                  != DVDNAV_STATUS_OK )
             {
                 msg_Warn( p_demux, "cannot set title/chapter" );
                 return VLC_EGENERIC;
             }
+
+            if( i != 0 )
+            {
+                dvdnav_still_skip( p_sys->dvdnav );
+                if( dvdnav_title_play( p_sys->dvdnav, i ) != DVDNAV_STATUS_OK )
+                {
+                    msg_Warn( p_demux, "cannot set title/chapter" );
+                    return VLC_EGENERIC;
+                }
+            }
+
             p_demux->info.i_update |=
                 INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
             p_demux->info.i_title = i;



More information about the vlc-commits mailing list