diff --git a/libavformat/mov.c b/libavformat/mov.c index 5ea6932801..b42537f562 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3964,6 +3964,9 @@ static int mov_read_close(AVFormatContext *s) AVStream *st = s->streams[i]; MOVStreamContext *sc = st->priv_data; + if (!sc) + continue; + av_freep(&sc->ctts_data); for (j = 0; j < sc->drefs_count; j++) { av_freep(&sc->drefs[j].path);