aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan <grigoriev.ivan.a@gmail.com>2016-01-25 14:43:40 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-26 20:56:55 +0100
commita0174f67298ba9494c146183dd360e637b03db64 (patch)
tree4c45b952bb81b3dff5320b978115da29fe7833ab
parent74658a8b4db3a0b99e1461283d358f800e93f73a (diff)
downloadffmpeg-a0174f67298ba9494c146183dd360e637b03db64.tar.gz
avformat/flvenc: copyts in FLV muxer
The purpose of this patch is to preserve timestamps when using ffmpeg for publishing RTMP streams, e.g. ffmpeg -i rtmp://source/stream -f flv rtmp://target/stream. There is a setting "copyts" for that purpose. Unfortunately it doesn't work with FLV muxer because it has its own timestamp correction which makes global setting "copyts" ineffective. This patch removes timestamp correction in FLV muxer. This means FLV will rely on ffmpeg timestamp correction which makes it possible to use copyts. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/flvenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 3925768fef..8fd5d29431 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -562,7 +562,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EINVAL);
}
- ts = pkt->dts + flv->delay; // add delay to force positive dts
+ ts = pkt->dts;
if (s->event_flags & AVSTREAM_EVENT_FLAG_METADATA_UPDATED) {
write_metadata(s, ts);