Commit 0c62cb15 authored by Hans Verkuil's avatar Hans Verkuil Committed by Ezequiel Garcia
Browse files

v4l2-mem2mem.c: fix broken links

The topology that v4l2_m2m_register_media_controller() creates for a
processing block actually created a source-to-source link and a sink-to-sink
link instead of two source-to-sink links.

Unfortunately v4l2-compliance never checked for such bad links, so this
went unreported for quite some time.
Signed-off-by: default avatarHans Verkuil <>
Reported-by: Nicolas Dufresne's avatarNicolas Dufresne <>
Cc: <>      # for v4.19 and up
parent ca8006df
......@@ -809,12 +809,12 @@ int v4l2_m2m_register_media_controller(struct v4l2_m2m_dev *m2m_dev,
goto err_rel_entity1;
/* Connect the three entities */
ret = media_create_pad_link(m2m_dev->source, 0, &m2m_dev->proc, 1,
ret = media_create_pad_link(m2m_dev->source, 0, &m2m_dev->proc, 0,
if (ret)
goto err_rel_entity2;
ret = media_create_pad_link(&m2m_dev->proc, 0, &m2m_dev->sink, 0,
ret = media_create_pad_link(&m2m_dev->proc, 1, &m2m_dev->sink, 0,
if (ret)
goto err_rm_links0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment