diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-21 00:45:48 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-21 00:45:48 +0200 |
commit | 23a9a40c33d284ee280b330b1ced9a7b6bcffd89 (patch) | |
tree | b29614b0ee680cad68381f443367b49695663c58 /main.c | |
parent | 3a78a901bbc07d9283a9b80e22be4e9500697745 (diff) |
Don't set formats on remote pads if the remote entity is not a subdev
When setting format on an output pad, the same format is automatically
set on the remote pads, if any. As the format setting API is
subdev-specific, skip remote pads that belong to a non-subdev entity.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -300,7 +300,7 @@ static int setup_format(struct media_device *media, const char *p, char **endp) return ret; /* If the pad is an output pad, automatically set the same format on - * the remote inputs, if any. + * the remote subdev input pads, if any. */ if (pad->type == MEDIA_PAD_TYPE_OUTPUT) { for (i = 0; i < pad->entity->info.links; ++i) { @@ -310,7 +310,8 @@ static int setup_format(struct media_device *media, const char *p, char **endp) if (!(link->flags & MEDIA_LINK_FLAG_ACTIVE)) continue; - if (link->source == pad) { + if (link->source == pad && + link->sink->entity->info.type == MEDIA_ENTITY_TYPE_SUBDEV) { remote_format = format; set_format(link->sink, &remote_format); } |