[FFmpeg-devel] [PATCH] ffplay.c minor refactoring

Tomer Barletz barletz
Wed Feb 18 06:22:13 CET 2009


On Wed, Feb 18, 2009 at 1:35 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Tue, Feb 17, 2009 at 02:14:13PM +0200, Tomer Barletz wrote:
>> Attached a minor patch which extracts some code from
>> video_refresh_timer into a new function - compute_field.
>
> if this just moves code out without changeing it then ok

First, I would like to correct my previous statement - the new
function is compute_frame_delay, and not compute_field. Sorry for
that, I probably should get more sleep... ;)

There are two semantic changes from the former code:
1.
if (delay <= 0 || delay >= 10.0) {
  delay = is->frame_last_delay;
}
is->frame_last_delay = delay;

is now:
if (delay <= 0 || delay >= 10.0)
  delay = is->frame_last_delay;
else
  is->frame_last_delay = delay;

2. The #if defined(DEBUG_SYNC) block will happened now before the call
to schedule_refresh, rather then after it in the previous code.

Tomer




More information about the ffmpeg-devel mailing list