[vlc-devel] commit: Fixed a big rtp demuxer. (Laurent Aimar )
git version control
git at videolan.org
Fri Sep 5 22:02:28 CEST 2008
vlc | branch: 0.9-bugfix | Laurent Aimar <fenrir at videolan.org> | Tue Sep 2 23:17:28 2008 +0200| [55a354a4751e51969f330483aa337ea4651dbc2b] | committer: Laurent Aimar
Fixed a big rtp demuxer.
DEMUX_GET_PTS_DELAY should returns microsecond.
You should NOT remove caching to PTS to create PCR.
It was probably a workaround for the previous bug. It could explains
the problems with TS over RTP (for TS with small pcr/pts delay that is, not
created by VLC)
Implemented missing DEMUX_CAN_* query.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55a354a4751e51969f330483aa337ea4651dbc2b
---
modules/demux/rtp.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/modules/demux/rtp.c b/modules/demux/rtp.c
index e9f9841..1d819b4 100644
--- a/modules/demux/rtp.c
+++ b/modules/demux/rtp.c
@@ -334,7 +334,7 @@ static int Control (demux_t *demux, int i_query, va_list args)
{
float *v = va_arg (args, float *);
*v = 0.;
- return 0;
+ return VLC_SUCCESS;
}
case DEMUX_GET_LENGTH:
@@ -342,14 +342,23 @@ static int Control (demux_t *demux, int i_query, va_list args)
{
int64_t *v = va_arg (args, int64_t *);
*v = 0;
- return 0;
+ return VLC_SUCCESS;
}
case DEMUX_GET_PTS_DELAY:
{
int64_t *v = va_arg (args, int64_t *);
- *v = p_sys->caching;
- return 0;
+ *v = p_sys->caching * 1000;
+ return VLC_SUCCESS;
+ }
+
+ case DEMUX_CAN_PAUSE:
+ case DEMUX_CAN_SEEK:
+ case DEMUX_CAN_CONTROL_PACE:
+ {
+ bool *v = (bool*)va_arg( args, bool * );
+ *v = false;
+ return VLC_SUCCESS;
}
}
@@ -453,8 +462,7 @@ static void codec_decode (demux_t *demux, void *data, block_t *block)
if (data)
{
block->i_dts = 0; /* RTP does not specify this */
- es_out_Control (demux->out, ES_OUT_SET_PCR,
- block->i_pts - demux->p_sys->caching * 1000);
+ es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts );
es_out_Send (demux->out, (es_out_id_t *)data, block);
}
else
More information about the vlc-devel
mailing list