[FFmpeg-devel] [PATCH 3/3] libavformat/demux.c: update_initial_timestamps() add null check

Scott Theisen scott.the.elm at gmail.com
Thu Nov 14 07:52:08 EET 2024


originally from https://github.com/MythTV/mythtv/commit/1a9ae8fa0665b1c8928974f9a2176eb3aa27a7e5
---
 libavformat/demux.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/demux.c b/libavformat/demux.c
index de792ceb3f..cbb8e37d45 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -868,6 +868,9 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
 
     uint64_t shift;
 
+    if (!st)
+        return;
+
     if (sti->first_dts != AV_NOPTS_VALUE ||
         dts           == AV_NOPTS_VALUE ||
         sti->cur_dts   == AV_NOPTS_VALUE ||
-- 
2.43.0



More information about the ffmpeg-devel mailing list