[FFmpeg-devel] [PATCH v3 3/4] avformat/movenc: check track start_dts before use it
Zhao Zhili
quinkblack at foxmail.com
Fri Dec 31 13:36:09 EET 2021
---
libavformat/movenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 9b3bd99e97..faae684fdb 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5465,7 +5465,7 @@ static int mov_flush_fragment(AVFormatContext *s, int force)
// tracks may need to be filled in.
for (i = 0; i < s->nb_streams; i++) {
MOVTrack *track = &mov->tracks[i];
- if (!track->end_reliable) {
+ if (!track->end_reliable && track->start_dts != AV_NOPTS_VALUE) {
const AVPacket *pkt = ff_interleaved_peek(s, i);
if (pkt) {
int64_t offset, dts, pts, duration;
--
2.31.1
More information about the ffmpeg-devel
mailing list