mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Add some more format checks
The format parse functions don't really check if the parsed values make any sense so we need to to this ourselves.
This commit is contained in:
parent
c30d743198
commit
74447acedb
24 changed files with 182 additions and 59 deletions
|
|
@ -599,8 +599,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
if ((res = spa_format_parse(param, &info.media_type, &info.media_subtype)) < 0)
|
||||
return res;
|
||||
if (info.media_type != SPA_MEDIA_TYPE_video ||
|
||||
info.media_subtype != SPA_MEDIA_SUBTYPE_raw)
|
||||
return -EINVAL;
|
||||
info.media_subtype != SPA_MEDIA_SUBTYPE_raw)
|
||||
return -EINVAL;
|
||||
|
||||
if (spa_format_video_raw_parse(param, &info.info.raw) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue