[vlc-commits] vlc_demux: add defines for pf_demux return values

Francois Cartegnie git at videolan.org
Thu Dec 18 22:39:54 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec  4 15:15:29 2014 +0100| [26beaad624f88fce900e7c6669aa55f86062a58f] | committer: Francois Cartegnie

vlc_demux: add defines for pf_demux return values

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

 include/vlc_demux.h |    5 +++++
 modules/demux/ogg.c |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/vlc_demux.h b/include/vlc_demux.h
index 0dcee0d..19f4d09 100644
--- a/include/vlc_demux.h
+++ b/include/vlc_demux.h
@@ -77,6 +77,11 @@ struct demux_t
     input_thread_t *p_input;
 };
 
+/* pf_demux return values */
+#define VLC_DEMUXER_EOF       0
+#define VLC_DEMUXER_EGENERIC -1
+#define VLC_DEMUXER_SUCCESS   1
+
 /* demux_t.info.i_update field */
 #define INPUT_UPDATE_TITLE      0x0010
 #define INPUT_UPDATE_SEEKPOINT  0x0020
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index a192f15..6e0a500 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -307,7 +307,7 @@ static int Demux( demux_t * p_demux )
         }
 
         if( Ogg_BeginningOfStream( p_demux ) != VLC_SUCCESS )
-            return 0;
+            return VLC_DEMUXER_EOF;
 
         msg_Dbg( p_demux, "beginning of a group of logical streams" );
 
@@ -350,7 +350,7 @@ static int Demux( demux_t * p_demux )
          * Demux an ogg page from the stream
          */
         if( Ogg_ReadPage( p_demux, &p_sys->current_page ) != VLC_SUCCESS )
-            return 0; /* EOF */
+            return VLC_DEMUXER_EOF; /* EOF */
         /* Test for End of Stream */
         if( ogg_page_eos( &p_sys->current_page ) )
         {
@@ -671,7 +671,7 @@ static int Demux( demux_t * p_demux )
         }
     }
 
-    return 1;
+    return VLC_DEMUXER_SUCCESS;
 }
 
 static void Ogg_ResetStream( logical_stream_t *p_stream )



More information about the vlc-commits mailing list