[FFmpeg-devel] [PATCH/WIP] lavf/gif: fix timing.

Paul B Mahol onemda at gmail.com
Fri Apr 19 02:10:45 CEST 2013


On 4/18/13, Clement Boesch <ubitux at gmail.com> wrote:
> On Thu, Apr 18, 2013 at 03:14:43PM +0200, Clement Boesch wrote:
>> ---
>> Delay between frames in GIF are expressed in ms, or 1/100.
>> Unfortunately, I need to use 1/1000 and rescale manually the
>> pkt->duration because they are otherwise incorrect: using
>> avpriv_set_pts_info(..., 1, 100) leads to pkt->duration=1 for any rate.
>>
>> Can be reproduced with -f lavfi testsrc=r={1,10,30,100...} or -r option
>> with a random input.
>>
>> Any idea what could cause this?
>>
>> Note: patch as WIP for this reason and the required FATE update.
>
>   19:33:53 < michaelni> ubitux, iam not sure your use of duration in the
> muxer is a good idea
>   19:34:15 < michaelni> currently its set from ff_compute_frame_duration()
>   19:34:52 < michaelni> so its not the actual durations just values based on
> frame rate
>
> So delay is now done with just pkt->pts diff.
>
> I'll apply this patch on top of the gif FATE test patch, so FATE unchanged
> in the current version.
>
> --
> Clement B.
>

looks fine


More information about the ffmpeg-devel mailing list