Skip to content
Snippets Groups Projects
Commit 79d482b1 authored by Martin Storsjö's avatar Martin Storsjö
Browse files

rtpdec: Don't set RTP timestamps if they already are set by the depacketizer

For MS-RTSP, we don't always get RTCP packets (never?), so the earlier
timestamping code never wrote anything into pkt->pts. The rtpdec_asf
depacketizer just sets the dts of the packet, so if the generic RTP
timestamping is used, too, we get inconsistent timestamps.

Therefore, skip the generic RTP timestamp algorithm if the depacketizer
already has set something.

This fixes "Invalid timestamps" warnings, present since SVN rev 26187.

Originally committed as revision 26241 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 6cbce636
No related branches found
No related tags found
No related merge requests found
...@@ -436,6 +436,8 @@ rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, ...@@ -436,6 +436,8 @@ rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
*/ */
static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestamp) static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestamp)
{ {
if (pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE)
return; /* Timestamp already set by depacketizer */
if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE && timestamp != RTP_NOTS_VALUE) { if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE && timestamp != RTP_NOTS_VALUE) {
int64_t addend; int64_t addend;
int delta_timestamp; int delta_timestamp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment