[vlc-devel] [PATCH] speex: Fix DecodeRtpSpeexPacket function PTS handling error
remi at remlab.net
Wed Jul 29 11:01:28 CEST 2015
Le 2015-07-28 21:55, Yupeng Chang a écrit :
> at line 708, the orginal code is
> if ( !date_Get( &p_sys->end_date ) )
> date_Set( &p_sys->end_date, p_speex_bit_block->i_dts );
> This is not correct.
> When end_date is 0, the first packet's PTS will be set to end_date,
> after RTCP sync,
> the packet's PTS/DTS will be much different than the first packet's
> if the end_date is not updated, decoder will always report error
I think this code was copied from the non-RTP version above. I think
you are right that it will break if the first RTCP SR compound is
received after the first RTP packet (or if NTP/RTP time correlation is
In my opinion, Speex over RTP should not be treated as a codec of its
own anyway. RTP depayloading and RTCP processing belongs in the demuxer.
> After I remove if ( !date_Get( &p_sys->end_date ) ), speex RTP
> back works perfect with VLC.
That would probably work as a stop-gap solution. But then I guess you
should remove the date_Increment() call. In fact, you should probably
remove date_*() calls completely and just copy the i_pts value from
input block to output block.
Ideally, the RTP processing would be moved out of the codec plugin into
the RTP plugin, though. Are you using live555?
More information about the vlc-devel