v4l2: only emit port info once

This commit is contained in:
Wim Taymans 2019-03-06 09:43:24 +01:00
parent 1d907412e5
commit 3777d9612e

View file

@ -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;
} }