summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-06-18 09:39:32 +0200
committerAnton Khirnov <anton@khirnov.net>2014-06-20 14:14:11 +0200
commit874390e163427c1fe7682ab27924a7843780dbb3 (patch)
treef178ddee50533875a3f572a450b3bb714496919c /libavcodec/avcodec.h
parent440842c4eb1d7709654ec97cd687663d11ef499c (diff)
lavc: add a convenience function for rescaling timestamps in a packet
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0396ea5614..cc74aeef04 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3421,6 +3421,19 @@ void av_packet_move_ref(AVPacket *dst, AVPacket *src);
int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
/**
+ * Convert valid timing fields (timestamps / durations) in a packet from one
+ * timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be
+ * ignored.
+ *
+ * @param pkt packet on which the conversion will be performed
+ * @param tb_src source timebase, in which the timing fields in pkt are
+ * expressed
+ * @param tb_dst destination timebase, to which the timing fields will be
+ * converted
+ */
+void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
+
+/**
* @}
*/