[FFmpeg-devel] [PATCH 2/8] avformat/mux: fix check_packet with null packet
Marton Balint
cus at passwd.hu
Sat Mar 28 20:15:09 EET 2020
Signed-off-by: Marton Balint <cus at passwd.hu>
---
libavformat/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mux.c b/libavformat/mux.c
index bfd1bf491b..dfb21c8aa5 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -798,7 +798,7 @@ static int prepare_input_packet(AVFormatContext *s, AVPacket *pkt)
#if !FF_API_COMPUTE_PKT_FIELDS2 || !FF_API_LAVF_AVCTX
/* sanitize the timestamps */
- if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) {
+ if (pkt && !(s->oformat->flags & AVFMT_NOTIMESTAMPS)) {
AVStream *st = s->streams[pkt->stream_index];
/* when there is no reordering (so dts is equal to pts), but
--
2.16.4
More information about the ffmpeg-devel
mailing list