1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

mov: Remove duration-of-last-frame heuristic hack

This breaks totally valid files that get caught in its heuristic.

This, according to the commit message, is my own doing, having asked
Michael to implement this check and providing a sample that was
"wrong". I am now atoning for my sins, and removing this hack, having
seen the light (aka that this was silly to do in the first place).

Resotores correct behavior on valid files.

This reverts commit 8e5e84c2a2.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2018-12-24 14:47:55 -05:00
parent 37af319086
commit 8f585c3c55

View File

@ -2923,12 +2923,6 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log(c->fc, AV_LOG_TRACE, "sample_count=%d, sample_duration=%d\n",
sample_count, sample_duration);
if ( i+1 == entries
&& i
&& sample_count == 1
&& total_sample_count > 100
&& sample_duration/10 > duration / total_sample_count)
sample_duration = duration / total_sample_count;
duration+=(int64_t)sample_duration*(uint64_t)sample_count;
total_sample_count+=sample_count;
}