[vlc-commits] demux: dvdnav: use defines for return

Francois Cartegnie git at videolan.org
Mon Aug 5 12:56:57 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug  5 12:00:16 2019 +0200| [8e2e46f29b9ae10f1edcd9ad44a5b0278b1d87ab] | committer: Francois Cartegnie

demux: dvdnav: use defines for return

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

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

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 4c240ecda5..5637454886 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -811,9 +811,10 @@ static int Demux( demux_t *p_demux )
         if( p_sys->cur_title == 0 )
         {
             msg_Dbg( p_demux, "jumping to first title" );
-            return ControlInternal( p_demux, DEMUX_SET_TITLE, 1 ) == VLC_SUCCESS ? 1 : -1;
+            return ControlInternal( p_demux, DEMUX_SET_TITLE, 1 ) == VLC_SUCCESS ?
+                        VLC_DEMUXER_SUCCESS : VLC_DEMUXER_EGENERIC;
         }
-        return -1;
+        return VLC_DEMUXER_EGENERIC;
     }
 
     vlc_mutex_lock( &p_sys->event_lock );
@@ -1084,7 +1085,7 @@ static int Demux( demux_t *p_demux )
 
         if( p_sys->b_readahead )
             dvdnav_free_cache_block( p_sys->dvdnav, packet );
-        return 0;
+        return VLC_DEMUXER_EOF;
 
     case DVDNAV_HIGHLIGHT:
     {
@@ -1129,7 +1130,7 @@ static int Demux( demux_t *p_demux )
     if( p_sys->b_readahead )
         dvdnav_free_cache_block( p_sys->dvdnav, packet );
 
-    return 1;
+    return VLC_DEMUXER_SUCCESS;
 }
 
 /* Get a 2 char code



More information about the vlc-commits mailing list