Commit 1ffe7f9e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: use stream_DemuxControl() - fixes #3145

parent 48c929bf
...@@ -372,25 +372,12 @@ static int extract_port (char **phost) ...@@ -372,25 +372,12 @@ static int extract_port (char **phost)
/** /**
* Control callback * Control callback
*/ */
static int Control (demux_t *demux, int i_query, va_list args) static int Control (demux_t *demux, int query, va_list args)
{ {
switch (i_query) demux_sys_t *sys = demux->p_sys;
{
case DEMUX_GET_POSITION:
{
float *v = va_arg (args, float *);
*v = 0.;
return VLC_SUCCESS;
}
case DEMUX_GET_LENGTH: switch (query)
case DEMUX_GET_TIME:
{ {
int64_t *v = va_arg (args, int64_t *);
*v = 0;
return VLC_SUCCESS;
}
case DEMUX_GET_PTS_DELAY: case DEMUX_GET_PTS_DELAY:
{ {
int64_t *v = va_arg (args, int64_t *); int64_t *v = va_arg (args, int64_t *);
...@@ -408,6 +395,27 @@ static int Control (demux_t *demux, int i_query, va_list args) ...@@ -408,6 +395,27 @@ static int Control (demux_t *demux, int i_query, va_list args)
} }
} }
if (sys->chained_demux != NULL)
return stream_DemuxControlVa (sys->chained_demux, query, args);
switch (query)
{
case DEMUX_GET_POSITION:
{
float *v = va_arg (args, float *);
*v = 0.;
return VLC_SUCCESS;
}
case DEMUX_GET_LENGTH:
case DEMUX_GET_TIME:
{
int64_t *v = va_arg (args, int64_t *);
*v = 0;
return VLC_SUCCESS;
}
}
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
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