History

avformat/mov: check for tts_count before deferencing tts_data

Fixes ticket #11460.

James Almer committed 1 year ago

Commit 43be8d01 parent 16f9cfc1 file · +1 −1Browse files

Unified · Split

libavformat/mov.c+1−1
@@ -5186,7 +5186,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 5185 unmodified lines
5186 }5186 }
5187 5187
5188 if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {5188 if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
5189 int stts_constant = !!sc->stts_count;5189 int stts_constant = sc->stts_count && sc->tts_count;
5190 if (sc->h_spacing && sc->v_spacing)5190 if (sc->h_spacing && sc->v_spacing)
5191 av_reduce(&st->sample_aspect_ratio.num, &st->sample_aspect_ratio.den,5191 av_reduce(&st->sample_aspect_ratio.num, &st->sample_aspect_ratio.den,
5192 sc->h_spacing, sc->v_spacing, INT_MAX);5192 sc->h_spacing, sc->v_spacing, INT_MAX);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t