[Ffmpeg-devel] [PATCH] mov fix fps detection

Uoti Urpala uoti.urpala
Tue Aug 8 01:13:54 CEST 2006


On Tue, 2006-08-08 at 00:26 +0200, Baptiste Coudurier wrote:
> Quoting from ISO 14496-12:

> stream may be the same. Great care must
> be taken when adding samples to a stream, that the sample that was
> previously last may need to have a non-
> zero duration established, in order to observe this rule. If the
> duration of the last sample is indeterminate, use
> an arbitrary small value and a `dwell' edit."


> +        /* ISO 14496-12 8.15, workaround since last entry may have an 'abritraty small value' */
> +        if (entries > 1 && i == entries - 1 && sample_count == 1)
> +            sample_duration = sc->stts_data[i - 1].duration;
>          sc->stts_data[i].count= sample_count;
>          sc->stts_data[i].duration= sample_duration;

The quote isn't talking about setting the last entry in a stream. It's
about handling samples which will NOT be last any more because new
samples are added.





More information about the ffmpeg-devel mailing list