summaryrefslogtreecommitdiff
path: root/libavformat/rtp.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-01 11:42:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-01 11:42:30 +0200
commit57b8ce414be574a772d386f57afa502eac072085 (patch)
tree7f33dce5aa004c3e2788804016f605f23fc2916e /libavformat/rtp.h
parent0c8efe48917fd9d6d2c9b61397318c1fd7c3f8c4 (diff)
parent2e814d0329aded98c811d0502839618f08642685 (diff)
downloadffmpeg-57b8ce414be574a772d386f57afa502eac072085.tar.gz
Merge commit '2e814d0329aded98c811d0502839618f08642685'
* commit '2e814d0329aded98c811d0502839618f08642685': rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtp.h')
-rw-r--r--libavformat/rtp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtp.h b/libavformat/rtp.h
index 1732af8a91..66a4f3afbd 100644
--- a/libavformat/rtp.h
+++ b/libavformat/rtp.h
@@ -23,6 +23,7 @@
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
+#include "libavutil/mathematics.h"
/**
* Return the payload type for a given stream used in the given format context.
@@ -109,4 +110,6 @@ enum RTCPType {
#define RTP_PT_IS_RTCP(x) (((x) >= RTCP_FIR && (x) <= RTCP_IJ) || \
((x) >= RTCP_SR && (x) <= RTCP_TOKEN))
+#define NTP_TO_RTP_FORMAT(x) av_rescale((x), INT64_C(1) << 32, 1000000)
+
#endif /* AVFORMAT_RTP_H */