mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
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>
This commit is contained in:
parent
74658a8b4d
commit
a0174f6729
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user