mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
ffmpeg: Treat subtitles like audio and video for non-monotonic dts.
Fixes ticket #4450. Fixes ticket #6248. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
540e8c2d64
commit
a790813739
@ -772,7 +772,7 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u
|
||||
- FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
|
||||
- FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
|
||||
}
|
||||
if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) &&
|
||||
if ((st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) &&
|
||||
pkt->dts != AV_NOPTS_VALUE &&
|
||||
!(st->codecpar->codec_id == AV_CODEC_ID_VP9 && ost->stream_copy) &&
|
||||
ost->last_mux_dts != AV_NOPTS_VALUE) {
|
||||
|
Loading…
Reference in New Issue
Block a user