1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

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

Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
Eugene Zemtsov
2024-10-24 18:54:10 -07:00
committed by Marth64
parent 8e8260aabf
commit 7c9bde1d0d

View File

@ -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)