aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-01-09 18:55:52 +0200
committerMartin Storsjö <martin@martin.st>2013-07-31 21:12:34 +0300
commit2e814d0329aded98c811d0502839618f08642685 (patch)
tree677956cd1d3218da6ea9526756ada0ccb1490a24 /libavformat/rtpenc.c
parent45dd1ae1b3c18331f3db2293a9135bc5851e553f (diff)
downloadffmpeg-2e814d0329aded98c811d0502839618f08642685.tar.gz
rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index c82a73a84c..d33060770e 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -273,8 +273,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time)
avio_w8(s1->pb, RTCP_SR);
avio_wb16(s1->pb, 6); /* length in words - 1 */
avio_wb32(s1->pb, s->ssrc);
- avio_wb32(s1->pb, ntp_time / 1000000);
- avio_wb32(s1->pb, ((ntp_time % 1000000) << 32) / 1000000);
+ avio_wb64(s1->pb, NTP_TO_RTP_FORMAT(ntp_time));
avio_wb32(s1->pb, rtp_ts);
avio_wb32(s1->pb, s->packet_count);
avio_wb32(s1->pb, s->octet_count);