Use the check since it's there already. --- libavformat/mov.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c index 4f64e96bc0..dcd263b02a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2909,9 +2909,10 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_TRACE, "track[%u].stts.entries = %u\n", c->fc->nb_streams-1, entries); - if (sc->stts_data) + if (sc->stts_data) { av_log(c->fc, AV_LOG_WARNING, "Duplicated STTS atom\n"); - av_freep(&sc->stts_data); + av_freep(&sc->stts_data); + } sc->stts_count = 0; if (entries >= INT_MAX / sizeof(*sc->stts_data)) return AVERROR(ENOMEM); -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".