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

avformat/mov: check for tts_count before deferencing tts_data

Fixes ticket #11460.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-02-07 23:00:34 -03:00
parent 16f9cfcf4b
commit 43be8d0728

View File

@ -5186,7 +5186,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
int stts_constant = !!sc->stts_count;
int stts_constant = sc->stts_count && sc->tts_count;
if (sc->h_spacing && sc->v_spacing)
av_reduce(&st->sample_aspect_ratio.num, &st->sample_aspect_ratio.den,
sc->h_spacing, sc->v_spacing, INT_MAX);