def SetInput1(self, widget):
         print("Switch to input 1")
         # Halt current pipeline and tear it down
-        self.pipeline.set_state(Gst.State.NULL)
+        self.pipeline.set_state(Gst.State.READY)
         self.webcamcaps.unlink(self.videosink)
         self.pipeline.remove(self.webcam)
         self.pipeline.remove(self.webcamcaps)
     def SetInput2(self, widget):
         print("Switch to input 2")
         # Halt current pipeline and tear it down
-        self.pipeline.set_state(Gst.State.NULL)
+        self.pipeline.set_state(Gst.State.READY)
         self.ballcaps.unlink(self.videosink)
         self.pipeline.remove(self.ball)
         self.pipeline.remove(self.ballcaps)