summaryrefslogtreecommitdiff
path: root/libavformat/rtspdec.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-01-01 22:27:16 +0000
committerMartin Storsjö <martin@martin.st>2011-01-01 22:27:16 +0000
commit3a1cdcc798fd7cb60ef69d1d010f5d56218c4b3a (patch)
treea07de61f687827dc5a3bd9b70cae18e6eefb77f0 /libavformat/rtspdec.c
parentdfaa9f3cb328f245cc1f9c56145a21c6d6e58f42 (diff)
rtpdec: Emit timestamps for packets before the first RTCP packet, too
Emitted timestamps in each stream start from 0, for the first received RTP packet. Once an RTCP packet is received, that one is used for sync, emitting timestamps that fit seamlessly into the earlier ones. Originally committed as revision 26187 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r--libavformat/rtspdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index 213f7095fb..ad13b170aa 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -67,6 +67,8 @@ static int rtsp_read_play(AVFormatContext *s)
if (reply->range_start != AV_NOPTS_VALUE) {
rtpctx->last_rtcp_ntp_time = AV_NOPTS_VALUE;
rtpctx->first_rtcp_ntp_time = AV_NOPTS_VALUE;
+ rtpctx->base_timestamp = 0;
+ rtpctx->rtcp_ts_offset = 0;
if (st)
rtpctx->range_start_offset =
av_rescale_q(reply->range_start, AV_TIME_BASE_Q,