[FFmpeg-devel] [PATCH 3/3] avformat/mov: remove always false condtion
Zhao Zhili
quinkblack at foxmail.com
Fri Dec 24 11:58:23 EET 2021
203b0e35 made duration unsigned.
---
libavformat/mov.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 63483740a0..636cfce400 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3972,17 +3972,6 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
current_offset += sample_size;
stream_size += sample_size;
-
- /* A negative sample duration is invalid based on the spec,
- * but some samples need it to correct the DTS. */
- if (sc->stts_data[stts_index].duration < 0) {
- av_log(mov->fc, AV_LOG_WARNING,
- "Invalid SampleDelta %d in STTS, at %d st:%d\n",
- sc->stts_data[stts_index].duration, stts_index,
- st->index);
- dts_correction += sc->stts_data[stts_index].duration - 1;
- sc->stts_data[stts_index].duration = 1;
- }
current_dts += sc->stts_data[stts_index].duration;
if (!dts_correction || current_dts + dts_correction > last_dts) {
current_dts += dts_correction;
--
2.31.1
More information about the ffmpeg-devel
mailing list