Commit c37fa71b authored by François Cartegnie's avatar François Cartegnie 🤞

demux: image: use VLC_DEMUXER_

parent 536615e7
...@@ -188,7 +188,7 @@ static int Demux(demux_t *demux) ...@@ -188,7 +188,7 @@ static int Demux(demux_t *demux)
demux_sys_t *sys = demux->p_sys; demux_sys_t *sys = demux->p_sys;
if (!sys->data) if (!sys->data)
return 0; return VLC_DEMUXER_EOF;
mtime_t deadline; mtime_t deadline;
const mtime_t pts_first = sys->pts_origin + date_Get(&sys->pts); const mtime_t pts_first = sys->pts_origin + date_Get(&sys->pts);
...@@ -201,7 +201,7 @@ static int Demux(demux_t *demux) ...@@ -201,7 +201,7 @@ static int Demux(demux_t *demux)
es_out_SetPCR(demux->out, deadline); es_out_SetPCR(demux->out, deadline);
/* That's ugly, but not yet easily fixable */ /* That's ugly, but not yet easily fixable */
mwait(deadline + max_wait); mwait(deadline + max_wait);
return 1; return VLC_DEMUXER_SUCCESS;
} }
} else { } else {
deadline = 1 + pts_first; deadline = 1 + pts_first;
...@@ -210,14 +210,14 @@ static int Demux(demux_t *demux) ...@@ -210,14 +210,14 @@ static int Demux(demux_t *demux)
for (;;) { for (;;) {
const mtime_t pts = sys->pts_origin + date_Get(&sys->pts); const mtime_t pts = sys->pts_origin + date_Get(&sys->pts);
if (sys->duration >= 0 && pts >= sys->pts_origin + sys->duration) if (sys->duration >= 0 && pts >= sys->pts_origin + sys->duration)
return 0; return VLC_DEMUXER_EOF;
if (pts >= deadline) if (pts >= deadline)
return 1; return VLC_DEMUXER_SUCCESS;
block_t *data = block_Duplicate(sys->data); block_t *data = block_Duplicate(sys->data);
if (!data) if (!data)
return -1; return VLC_DEMUXER_EGENERIC;
data->i_dts = data->i_dts =
data->i_pts = VLC_TS_0 + pts; data->i_pts = VLC_TS_0 + pts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment