[vlc-commits] demux: gme: use VLC_DEMUXER_

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


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May  2 17:33:00 2018 +0200| [536615e78a87850f0f9abd99074fb7564aa23c6a] | committer: Francois Cartegnie

demux: gme: use VLC_DEMUXER_

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

 modules/demux/gme.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/gme.c b/modules/demux/gme.c
index e0d8788da3..4e6b29ba87 100644
--- a/modules/demux/gme.c
+++ b/modules/demux/gme.c
@@ -210,7 +210,7 @@ static int Demux (demux_t *demux)
     {
         msg_Dbg (demux, "track %u ended", sys->track_id);
         if (++sys->track_id >= (unsigned)gme_track_count (sys->emu))
-            return 0;
+            return VLC_DEMUXER_EOF;
 
         sys->title_changed = true;
         gme_start_track (sys->emu, sys->track_id);
@@ -219,21 +219,21 @@ static int Demux (demux_t *demux)
 
     block_t *block = block_Alloc (2 * 2 * SAMPLES);
     if (unlikely(block == NULL))
-        return 0;
+        return VLC_DEMUXER_EOF;
 
     gme_err_t ret = gme_play (sys->emu, 2 * SAMPLES, (void *)block->p_buffer);
     if (ret != NULL)
     {
         block_Release (block);
         msg_Err (demux, "%s", ret);
-        return 0;
+        return VLC_DEMUXER_EOF;
     }
 
     block->i_pts = block->i_dts = VLC_TS_0 + date_Get (&sys->pts);
     es_out_SetPCR (demux->out, block->i_pts);
     es_out_Send (demux->out, sys->es, block);
     date_Increment (&sys->pts, SAMPLES);
-    return 1;
+    return VLC_DEMUXER_SUCCESS;
 }
 
 



More information about the vlc-commits mailing list