mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-01 13:44:40 +00:00
handle some error cases
This commit is contained in:
parent
c88f841a58
commit
1c18e8aa69
|
@ -800,8 +800,10 @@ static int v4l2_openat(int dirfd, const char *path, int oflag, mode_t mode)
|
|||
if ((file = find_file_by_dev(dev_id)) != NULL) {
|
||||
res = do_dup(file->fd, 0);
|
||||
unref_file(file);
|
||||
if (res >= 0)
|
||||
fcntl(res, F_SETFL, oflag);
|
||||
if (res < 0)
|
||||
return res;
|
||||
if (fcntl(res, F_SETFL, oflag) < 0)
|
||||
pw_log_warn("fd:%d failed to set flags: %m", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,8 @@ static void node_param(void *data, int seq,
|
|||
{
|
||||
uint32_t media_type, media_subtype;
|
||||
|
||||
spa_format_parse(param, &media_type, &media_subtype);
|
||||
if (spa_format_parse(param, &media_type, &media_subtype) < 0)
|
||||
goto done;
|
||||
|
||||
switch(media_type) {
|
||||
case SPA_MEDIA_TYPE_audio:
|
||||
|
|
Loading…
Reference in a new issue