From 67b692396bd54f9028b2426ef32630b2336ff29e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 18 Jun 2020 18:26:00 +0200 Subject: [PATCH] v4l2: remove format checks When a caller sets a format, we do this regardless of the currently configured format. --- spa/plugins/v4l2/v4l2-source.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/spa/plugins/v4l2/v4l2-source.c b/spa/plugins/v4l2/v4l2-source.c index 286fb5786..036558189 100644 --- a/spa/plugins/v4l2/v4l2-source.c +++ b/spa/plugins/v4l2/v4l2-source.c @@ -603,33 +603,14 @@ static int port_set_format(void *object, spa_log_error(this->log, "can't parse video raw"); return -EINVAL; } - - if (port->have_format && info.media_type == port->current_format.media_type && - info.media_subtype == port->current_format.media_subtype && - info.info.raw.format == port->current_format.info.raw.format && - info.info.raw.size.width == port->current_format.info.raw.size.width && - info.info.raw.size.height == port->current_format.info.raw.size.height) - return 0; break; case SPA_MEDIA_SUBTYPE_mjpg: if (spa_format_video_mjpg_parse(format, &info.info.mjpg) < 0) return -EINVAL; - - if (port->have_format && info.media_type == port->current_format.media_type && - info.media_subtype == port->current_format.media_subtype && - info.info.mjpg.size.width == port->current_format.info.mjpg.size.width && - info.info.mjpg.size.height == port->current_format.info.mjpg.size.height) - return 0; break; case SPA_MEDIA_SUBTYPE_h264: if (spa_format_video_h264_parse(format, &info.info.h264) < 0) return -EINVAL; - - if (port->have_format && info.media_type == port->current_format.media_type && - info.media_subtype == port->current_format.media_subtype && - info.info.h264.size.width == port->current_format.info.h264.size.width && - info.info.h264.size.height == port->current_format.info.h264.size.height) - return 0; break; default: return -EINVAL;