[FFmpeg-devel] [PATCH] avformat/mux: fix overflow in case one of dts in not set
Paul B Mahol
onemda at gmail.com
Thu Sep 30 15:10:14 EEST 2021
On Thu, Sep 30, 2021 at 1:54 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:
> On Thu, Sep 30, 2021 at 12:36:17PM +0200, Paul B Mahol wrote:
> > Signed-off-by: Paul B Mahol <onemda at gmail.com>
> > ---
> > libavformat/mux.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/mux.c b/libavformat/mux.c
> > index 2053a5636e..583328b123 100644
> > --- a/libavformat/mux.c
> > +++ b/libavformat/mux.c
> > @@ -949,7 +949,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s,
> AVPacket *out,
> > last_dts = av_rescale_q(last->pkt.dts,
> > st->time_base,
> > AV_TIME_BASE_Q);
> > - delta_dts = FFMAX(delta_dts, last_dts - top_dts);
> > + delta_dts = FFMAX(delta_dts, (top_dts == AV_NOPTS_VALUE ||
> last_dts == AV_NOPTS_VALUE) ? 0 : last_dts - top_dts);
> > }
>
> In which case are packets without DTS interleaved by DTS ?
>
In many cases, for example few of them being exposed by FATE, and
--enable-ftrapv
See fate.ffmpeg.org
>
> thx
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Dictatorship: All citizens are under surveillance, all their steps and
> actions recorded, for the politicians to enforce control.
> Democracy: All politicians are under surveillance, all their steps and
> actions recorded, for the citizens to enforce control.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list