diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-16 21:18:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-18 19:11:50 +0200 |
commit | 3e44bd068fc19baeaab3295fce8379c68e4b2b2a (patch) | |
tree | bea01855e25b615a44a6831eea75e10c182754e3 /libavformat/fifo.c | |
parent | a42d249c9130e8627e18f13dd1a9a0c0ed0d9dd6 (diff) |
avformat/fifo: check for flushed packets and timeshift
Fixes: CID1464151 Dereference after null check
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/fifo.c')
-rw-r--r-- | libavformat/fifo.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |