ffmpeg | branch: master | Eugene Zemtsov <eug...@chromium.org> | Thu Oct 24 
18:54:10 2024 -0700| [7c9bde1d0d26ffa74b6791666c3a27c6d5d5019f] | committer: 
Marth64

avformat/mov: fix crash when trying to get a fragment time for a non-existing 
fragment

Reviewed-by: Dale Curtis <dalecur...@chromium.org>
Reviewed-by: Marth64 <mart...@proxyid.net>
Signed-off-by: Marth64 <mart...@proxyid.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c9bde1d0d26ffa74b6791666c3a27c6d5d5019f
---

 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2f79aa3727..93e1cebe65 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1673,6 +1673,8 @@ static int64_t get_frag_time(AVFormatContext *s, AVStream 
*dst_st,
     // to fragments that referenced this stream in the sidx
     if (sc->has_sidx) {
         frag_stream_info = get_frag_stream_info(frag_index, index, sc->id);
+        if (!frag_stream_info)
+            return AV_NOPTS_VALUE;
         if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE)
             return frag_stream_info->sidx_pts;
         if (frag_stream_info->first_tfra_pts != AV_NOPTS_VALUE)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to