diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-11-10 22:21:20 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-11-27 00:38:57 +0100 |
commit | 80b85300ae0b8c6c1bb813a4390d94e3ea87b1da (patch) | |
tree | c9ba637de52b477f00359b2a1080a0f8857cc749 | |
parent | 48d24cca1308d7cc78aa99827b5449a8577a68a2 (diff) | |
download | ffmpeg-80b85300ae0b8c6c1bb813a4390d94e3ea87b1da.tar.gz |
sbgdec: prevent NULL pointer access
Reviewed-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit dbefbb61b785cd77810c032f5cdb499d2a92df07)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r-- | libavformat/sbgdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c index 03cd9226c9..659dfc81ff 100644 --- a/libavformat/sbgdec.c +++ b/libavformat/sbgdec.c @@ -927,7 +927,7 @@ static void expand_timestamps(void *log, struct sbg_script *s) } } if (s->start_ts == AV_NOPTS_VALUE) - s->start_ts = s->opt_start_at_first ? s->tseq[0].ts.t : now; + s->start_ts = (s->opt_start_at_first && s->tseq) ? s->tseq[0].ts.t : now; s->end_ts = s->opt_duration ? s->start_ts + s->opt_duration : AV_NOPTS_VALUE; /* may be overridden later by -E option */ cur_ts = now; |