[FFmpeg-devel] [PATCH 8/9] lavf/mov: drop a never-executed block
Gyan Doshi
ffmpeg at gyani.pro
Thu Nov 25 17:52:31 EET 2021
On 2021-11-25 08:34 pm, Anton Khirnov wrote:
> MOVStts.duration is unsigned since 203b0e3561d.
> ---
> libavformat/mov.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 451cb78bbf..e85eeb0a0e 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -3965,16 +3965,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;
See
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20211123131106.8652-1-ffmpeg@gyani.pro/
Although stts duration should be and is now unsigned, some writers treat
it as signed and use negative values for DTS correction.
Michael is reviewing my patch and is offering critiques + suggestions.
Regards,
Gyan
More information about the ffmpeg-devel
mailing list