[FFmpeg-devel] [PATCH 3/3] avformat/fifo: check for flushed packets and timeshift

Michael Niedermayer michael at niedermayer.cc
Tue May 18 20:11:15 EEST 2021


On Sun, May 16, 2021 at 10:37:26PM +0200, Marton Balint wrote:
> 
> 
> On Sun, 16 May 2021, Michael Niedermayer wrote:
> 
> > Fixes: CID1464151 Dereference after null check
> > 
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavformat/fifo.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/fifo.c b/libavformat/fifo.c
> > index 620fffa032..50656f78b7 100644
> > --- a/libavformat/fifo.c
> > +++ b/libavformat/fifo.c
> > @@ -593,7 +593,7 @@ static int fifo_write_packet(AVFormatContext *avf, AVPacket *pkt)
> >         goto fail;
> >     }
> > 
> > -    if (fifo->timeshift && pkt->dts != AV_NOPTS_VALUE)
> > +    if (fifo->timeshift && pkt && pkt->dts != AV_NOPTS_VALUE)
> >         atomic_fetch_add_explicit(&fifo->queue_duration, next_duration(avf, pkt, &fifo->last_sent_dts), memory_order_relaxed);
> > 
> >     return ret;
> 
> LGTM, thanks.

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210518/5d425cb2/attachment.sig>


More information about the ffmpeg-devel mailing list