<div dir="ltr"><div>Hi Laurent,</div><div><br></div><div>Just a kind reminder to see if you have some feedback on the patch :-)</div><div><br></div><div>Thanks !</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 4, 2021 at 11:04 PM Phi-Bang Nguyen <<a href="mailto:pnguyen@baylibre.com">pnguyen@baylibre.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When seting up the pipeline, the latest entity in the queue is<br>
taken but the oldest one is poped. This is a mistake. Fix it.<br>
<br>
Fixes: 4671911df040 ("pipeline: simple: Use breadth-first search<br>
to setup media pipeline")<br>
<br>
Signed-off-by: Phi-Bang Nguyen <<a href="mailto:pnguyen@baylibre.com" target="_blank">pnguyen@baylibre.com</a>><br>
---<br>
 src/libcamera/pipeline/simple/simple.cpp | 6 +++---<br>
 1 file changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp<br>
index f81a4d15..a2dbc336 100644<br>
--- a/src/libcamera/pipeline/simple/simple.cpp<br>
+++ b/src/libcamera/pipeline/simple/simple.cpp<br>
@@ -288,12 +288,12 @@ SimpleCameraData::SimpleCameraData(SimplePipelineHandler *pipe,<br>
<br>
        /* Remember at each entity where we came from. */<br>
        std::unordered_map<MediaEntity *, Entity> parents;<br>
-       queue.push(sensor);<br>
-<br>
        MediaEntity *entity = nullptr;<br>
<br>
+       queue.push(sensor);<br>
+<br>
        while (!queue.empty()) {<br>
-               entity = queue.back();<br>
+               entity = queue.front();<br>
                queue.pop();<br>
<br>
                /* Found the capture device. */<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div></div>