[gst-cvs] gst-plugins-bad: camerabin: reset filename after capture to avoid racy when capturing again

Jan Schmidt thaytan at kemper.freedesktop.org
Tue Jun 16 11:15:11 PDT 2009


Module: gst-plugins-bad
Branch: master
Commit: 2bb31a8d4a3df3604799bcc07cf6673fed12ebb7
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=2bb31a8d4a3df3604799bcc07cf6673fed12ebb7

Author: Stefan Kost <ensonic at users.sf.net>
Date:   Tue Jun 16 17:09:26 2009 +0300

camerabin: reset filename after capture to avoid racy when capturing again

If we don't reset the filename we cannot check if we still expect the filename
for a subsequent capture pass. The imagebin would good to paused and we set the
filename in that state. This trigers an error-message and would capture to the
old filename.

---

 gst/camerabin/camerabinimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gst/camerabin/camerabinimage.c b/gst/camerabin/camerabinimage.c
index 10b0adf..da979f0 100644
--- a/gst/camerabin/camerabinimage.c
+++ b/gst/camerabin/camerabinimage.c
@@ -211,6 +211,7 @@ gst_camerabin_image_change_state (GstElement * element,
           img->filename->str);
       gst_element_set_locked_state (img->sink, TRUE);
       gst_element_set_state (img->sink, GST_STATE_NULL);
+      g_string_assign (img->filename, "");
       break;
     default:
       break;





More information about the Gstreamer-commits mailing list