mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-04 07:15:35 -04:00
videoconvert: return error on invalid formats
This commit is contained in:
parent
dba31d7e2a
commit
ae1bbc93d8
1 changed files with 2 additions and 0 deletions
|
|
@ -1559,6 +1559,8 @@ static int port_set_format(void *object,
|
||||||
int linesizes[4];
|
int linesizes[4];
|
||||||
|
|
||||||
pix_fmt = format_to_pix_fmt(info.info.raw.format);
|
pix_fmt = format_to_pix_fmt(info.info.raw.format);
|
||||||
|
if (pix_fmt == AV_PIX_FMT_NONE)
|
||||||
|
return -EINVAL;
|
||||||
av_image_fill_linesizes(linesizes, pix_fmt, info.info.raw.size.width);
|
av_image_fill_linesizes(linesizes, pix_fmt, info.info.raw.size.width);
|
||||||
port->stride = linesizes[0];
|
port->stride = linesizes[0];
|
||||||
port->blocks = 0;
|
port->blocks = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue