{
static struct timespec start = {0,0};
struct timespec end, d;
- static int f = 0; /* number of frames */
+ static int f = -1; /* number interframe intevals elapsed */
double ifi;
static double ifi_avg=0, ifi_var=0;
clock_gettime(CLOCK_MONOTONIC, &end);
timespec_subtract(&d, &end, &start);
- if (f++ == 0)
+ if (f++ < 0)
goto out; /* First run */
ifi = (double)d.tv_sec + 1e-9*d.tv_nsec;
#define SQ(x) ((x)*(x))
};
#ifdef CONFIG_FFMPEG_WITH_FRSH
-
void *av_encode_thread(void *arg)
{
int ret, terror;