mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
v4l2: only emit port info once
This commit is contained in:
parent
1d907412e5
commit
3777d9612e
1 changed files with 1 additions and 4 deletions
|
|
@ -920,7 +920,7 @@ static int spa_v4l2_set_format(struct impl *this, struct spa_video_info *format,
|
||||||
port->rate.num = framerate->denom = streamparm.parm.capture.timeperframe.numerator;
|
port->rate.num = framerate->denom = streamparm.parm.capture.timeperframe.numerator;
|
||||||
|
|
||||||
port->fmt = fmt;
|
port->fmt = fmt;
|
||||||
port->info.change_mask = SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_RATE;
|
port->info.change_mask |= SPA_PORT_CHANGE_MASK_FLAGS | SPA_PORT_CHANGE_MASK_RATE;
|
||||||
port->info.flags = (port->export_buf ? SPA_PORT_FLAG_CAN_ALLOC_BUFFERS : 0) |
|
port->info.flags = (port->export_buf ? SPA_PORT_FLAG_CAN_ALLOC_BUFFERS : 0) |
|
||||||
SPA_PORT_FLAG_CAN_USE_BUFFERS |
|
SPA_PORT_FLAG_CAN_USE_BUFFERS |
|
||||||
SPA_PORT_FLAG_LIVE |
|
SPA_PORT_FLAG_LIVE |
|
||||||
|
|
@ -928,9 +928,6 @@ static int spa_v4l2_set_format(struct impl *this, struct spa_video_info *format,
|
||||||
SPA_PORT_FLAG_TERMINAL;
|
SPA_PORT_FLAG_TERMINAL;
|
||||||
port->info.rate = SPA_FRACTION(port->rate.num, port->rate.denom);
|
port->info.rate = SPA_FRACTION(port->rate.num, port->rate.denom);
|
||||||
|
|
||||||
spa_node_emit_port_info(&this->hooks, SPA_DIRECTION_OUTPUT, 0, &port->info);
|
|
||||||
port->info.change_mask = 0;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue