clock: set rate correctly

The ticks multiplied by the rate should give the time in seconds.
This commit is contained in:
Wim Taymans 2018-08-15 21:31:59 +02:00
parent d181574520
commit 26fa9eae39
5 changed files with 10 additions and 10 deletions

View file

@ -901,8 +901,8 @@ static int spa_v4l2_set_format(struct impl *this, struct spa_video_info *format,
size->width = fmt.fmt.pix.width;
size->height = fmt.fmt.pix.height;
framerate->num = streamparm.parm.capture.timeperframe.denominator;
framerate->denom = streamparm.parm.capture.timeperframe.numerator;
port->rate.denom = framerate->num = streamparm.parm.capture.timeperframe.denominator;
port->rate.num = framerate->denom = streamparm.parm.capture.timeperframe.numerator;
port->fmt = fmt;
port->info.flags = (port->export_buf ? SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS : 0) |
@ -911,7 +911,6 @@ static int spa_v4l2_set_format(struct impl *this, struct spa_video_info *format,
SPA_PORT_INFO_FLAG_PHYSICAL |
SPA_PORT_INFO_FLAG_TERMINAL;
port->info.rate = streamparm.parm.capture.timeperframe.denominator;
port->rate = *framerate;
return 0;
}