ringbuffer_t r;
videoreader_t* video;
+ double video_fps;
int width;
int height;
int xv,yv;
int xm = (i->video->width*65536)/i->width;
int ym = (i->video->height*65536)/i->height;
+ msg("scaling from %dx%d to %dx%d\n",
+ i->video->width, i->video->height,
+ i->width, i->height
+ );
+
memset(i->buffer, 255, i->width*i->height*4);
for(y=0,yv=0;y<i->height;y++,yv+=ym) {
int*src = &((int*)i->vrbuffer)[(yv>>16)*i->video->width];
writeShowFrame(i);
}
- msg("scaling\n");
-
scaleimage(i);
msg("version is %d\n", i->version);
msg("video: %dx%d, fps %f\n", video->width, video->height, video->fps);
i->video = video;
+ i->video_fps = ((int)(video->fps*256))/256.0;
i->blockdiff = 64;
i->keyframe_interval = 8;
i->quality = 20;
i->diffmode = DIFFMODE_QMEAN;
i->audio_fix = 1.0;
i->fixheader = 0;
- i->framerate = video->fps;
+ i->framerate = i->video_fps;
i->fpsratio = 1.00000000000;
i->fpspos = 0.0;
i->bitrate = 32;
i->samplerate = atoi(value);
} else if(!strcmp(name, "framerate")) {
i->framerate = atof(value);
- i->fpsratio = i->framerate / i->video->fps;
+ i->fpsratio = i->framerate / i->video_fps;
}
else if(!strcmp(name, "mp3_bitrate")) {
int t=0,o;