aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorFred Rothganger <frothga@sandia.gov>2014-03-11 17:58:34 -0600
committerMichael Niedermayer <michaelni@gmx.at>2014-03-12 13:33:14 +0100
commit3f3229cd109f5cdf1f1d6fe26f2864e32e029b53 (patch)
tree4d0a2895c5ac1e1e3fc529a439f6b5d1b1ba6790 /libavformat/rtpenc.c
parent581957cd8618f07d824da1b9f6ae1c97531b03ab (diff)
downloadandroid_external_ffmpeg-3f3229cd109f5cdf1f1d6fe26f2864e32e029b53.tar.gz
android_external_ffmpeg-3f3229cd109f5cdf1f1d6fe26f2864e32e029b53.tar.bz2
android_external_ffmpeg-3f3229cd109f5cdf1f1d6fe26f2864e32e029b53.zip
avformat: extracting NTP timestamp from RTCP
For muxing, it accepts both 0 and AV_NOPTS_VALUE. For demuxing, it will present AV_NOPTS_VALUE when start_time_realtime is unknown. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index f0100083b8..457fef0cfc 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -119,7 +119,7 @@ static int rtp_write_header(AVFormatContext *s1)
s->ssrc = av_get_random_seed();
s->first_packet = 1;
s->first_rtcp_ntp_time = ff_ntp_time();
- if (s1->start_time_realtime)
+ if (s1->start_time_realtime != 0 && s1->start_time_realtime != AV_NOPTS_VALUE)
/* Round the NTP time to whole milliseconds. */
s->first_rtcp_ntp_time = (s1->start_time_realtime / 1000) * 1000 +
NTP_OFFSET_US;