[vlc-commits] demux: image: use VLC_DEMUXER_

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


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

demux: image: use VLC_DEMUXER_

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

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

diff --git a/modules/demux/image.c b/modules/demux/image.c
index e5c5ce76ba..4cc9fddb1b 100644
--- a/modules/demux/image.c
+++ b/modules/demux/image.c
@@ -188,7 +188,7 @@ static int Demux(demux_t *demux)
     demux_sys_t *sys = demux->p_sys;
 
     if (!sys->data)
-        return 0;
+        return VLC_DEMUXER_EOF;
 
     mtime_t deadline;
     const mtime_t pts_first = sys->pts_origin + date_Get(&sys->pts);
@@ -201,7 +201,7 @@ static int Demux(demux_t *demux)
             es_out_SetPCR(demux->out, deadline);
             /* That's ugly, but not yet easily fixable */
             mwait(deadline + max_wait);
-            return 1;
+            return VLC_DEMUXER_SUCCESS;
         }
     } else {
         deadline = 1 + pts_first;
@@ -210,14 +210,14 @@ static int Demux(demux_t *demux)
     for (;;) {
         const mtime_t pts = sys->pts_origin + date_Get(&sys->pts);
         if (sys->duration >= 0 && pts >= sys->pts_origin + sys->duration)
-            return 0;
+            return VLC_DEMUXER_EOF;
 
         if (pts >= deadline)
-            return 1;
+            return VLC_DEMUXER_SUCCESS;
 
         block_t *data = block_Duplicate(sys->data);
         if (!data)
-            return -1;
+            return VLC_DEMUXER_EGENERIC;
 
         data->i_dts =
         data->i_pts = VLC_TS_0 + pts;



More information about the vlc-commits mailing list