[vlc-commits] demux: ty: use VLC_DEMUXER_

Francois Cartegnie git at videolan.org
Thu May 3 13:59:38 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May  3 12:13:12 2018 +0200| [588c47aaeba215eb49bd1350db59f3bc5a16a917] | committer: Francois Cartegnie

demux: ty: use VLC_DEMUXER_

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

 modules/demux/ty.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index 3afa07b94a..700e412bd2 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -398,7 +398,7 @@ static int Demux( demux_t *p_demux )
 
     /* did we hit EOF earlier? */
     if( p_sys->eof )
-        return 0;
+        return VLC_DEMUXER_EOF;
 
     /*
      * what we do (1 record now.. maybe more later):
@@ -418,7 +418,7 @@ static int Demux( demux_t *p_demux )
     if( p_sys->b_first_chunk || p_sys->i_cur_rec >= p_sys->i_num_recs )
     {
         if( get_chunk_header(p_demux) == 0 || p_sys->i_num_recs == 0 )
-            return 0;
+            return VLC_DEMUXER_EOF;
     }
 
     /*======================================================================
@@ -437,12 +437,12 @@ static int Demux( demux_t *p_demux )
         {
             /* no data in payload; we're done */
             p_sys->i_cur_rec++;
-            return 1;
+            return VLC_DEMUXER_SUCCESS;
         }
 
         /* read in this record's payload */
         if( !( p_block_in = vlc_stream_Block( p_demux->s, l_rec_size ) ) )
-            return 0;
+            return VLC_DEMUXER_EOF;
 
         /* set these as 'unknown' for now */
         p_block_in->i_pts =
@@ -483,7 +483,7 @@ static int Demux( demux_t *p_demux )
 
     /* */
     p_sys->i_cur_rec++;
-    return 1;
+    return VLC_DEMUXER_SUCCESS;
 }
 
 /* Control */



More information about the vlc-commits mailing list