camerabin: Do not wrongly fail when starting a capture
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 29 Sep 2010 20:34:00 +0000 (17:34 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 29 Sep 2010 21:42:27 +0000 (18:42 -0300)
commit5cb8164938cc4b902ee697a5754e203464fed9e1
tree8aa687b731c0b433eb4e520729e77017473b36f3
parentde97a994ba87b0b3e361532878e4366842d85f3c
camerabin: Do not wrongly fail when starting a capture

If the elements are in NULL/READY and changing state to
PAUSED/PLAYING while a capture is started
camerabin might not set the active_bin properly causing the
capture start to fail.

This patch fixes it by checking the current and pending state
of the branches instead of only the current one
gst/camerabin/gstcamerabin.c