diff --git a/libavformat/mov.c b/libavformat/mov.c index a9e1fa9189..4e38692ea5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3853,6 +3853,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);