[vlc-commits] demux: mpc: use VLC_DEMUXER_

Francois Cartegnie git at videolan.org
Thu May 3 10:14:00 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May  2 18:34:14 2018 +0200| [2242bb19666d03c632849efda03be63ca09b4ce6] | committer: Francois Cartegnie

demux: mpc: use VLC_DEMUXER_

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

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

diff --git a/modules/demux/mpc.c b/modules/demux/mpc.c
index df6259cc47..bbe18d9e58 100644
--- a/modules/demux/mpc.c
+++ b/modules/demux/mpc.c
@@ -262,7 +262,7 @@ static int Demux( demux_t *p_demux )
 #endif
     p_data = block_Alloc( MPC_DECODER_BUFFER_LENGTH*sizeof(MPC_SAMPLE_FORMAT) );
     if( !p_data )
-        return -1;
+        return VLC_DEMUXER_EGENERIC;
 
 #ifndef HAVE_MPC_MPCDEC_H
     i_ret = mpc_decoder_decode( &p_sys->decoder,
@@ -271,7 +271,7 @@ static int Demux( demux_t *p_demux )
     if( i_ret <= 0 )
     {
         block_Release( p_data );
-        return i_ret < 0 ? -1 : 0;
+        return i_ret < 0 ? VLC_DEMUXER_EGENERIC : VLC_DEMUXER_EOF;
     }
 #else
     frame.buffer = (MPC_SAMPLE_FORMAT*)p_data->p_buffer;
@@ -279,12 +279,12 @@ static int Demux( demux_t *p_demux )
     if( err != MPC_STATUS_OK )
     {
         block_Release( p_data );
-        return -1;
+        return VLC_DEMUXER_EGENERIC;
     }
     else if( frame.bits == -1 )
     {
         block_Release( p_data );
-        return 0;
+        return VLC_DEMUXER_EOF;
     }
 
     i_ret = frame.samples;
@@ -302,7 +302,7 @@ static int Demux( demux_t *p_demux )
     /* */
     p_sys->i_position += i_ret;
 
-    return 1;
+    return VLC_DEMUXER_SUCCESS;
 }
 
 /*****************************************************************************



More information about the vlc-commits mailing list