[vlc-commits] demux: mod: use VLC_DEMUXER_

Francois Cartegnie git at videolan.org
Thu May 3 10:13:58 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May  2 18:18:20 2018 +0200| [553a59a449f7ffd296d4479cf4deb2f637c160b8] | committer: Francois Cartegnie

demux: mod: use VLC_DEMUXER_

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

 modules/demux/mod.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mod.c b/modules/demux/mod.c
index bf3b4138e3..d15cbdad97 100644
--- a/modules/demux/mod.c
+++ b/modules/demux/mod.c
@@ -268,14 +268,14 @@ static int Demux( demux_t *p_demux )
 
     p_frame = block_Alloc( p_sys->fmt.audio.i_rate / 10 * i_bk );
     if( !p_frame )
-        return -1;
+        return VLC_DEMUXER_EGENERIC;
 
     const int i_read = ModPlug_Read( p_sys->f, p_frame->p_buffer, p_frame->i_buffer );
     if( i_read <= 0 )
     {
         /* EOF */
         block_Release( p_frame );
-        return 0;
+        return VLC_DEMUXER_EOF;
     }
     p_frame->i_buffer = i_read;
     p_frame->i_dts =
@@ -289,7 +289,7 @@ static int Demux( demux_t *p_demux )
 
     date_Increment( &p_sys->pts, i_read / i_bk );
 
-    return 1;
+    return VLC_DEMUXER_SUCCESS;
 }
 
 /*****************************************************************************



More information about the vlc-commits mailing list