Although sample count and delta are in ISO 14496-12 specified as unsigned files exists were interpreting it as signed integer makes more sense (see mp4-negative-stts-problem.mp4). Fixes an assert caused by negative avg_frame_rate deduced from a negative duration computed in mov_read_stts() with the fuzzed sample sample.mp4_s201788. ---
also ping on [PATCH 2/2] mov: compute avg_frame_rate only if duration is known in this thread. libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index c6ff84b..8db26f0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1664,7 +1664,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) return AVERROR_EOF; st->nb_frames= total_sample_count; - if (duration) + if (duration > 0) st->duration= duration; sc->track_end = duration; return 0; -- 1.7.12.4 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel