From deeef84d2c179b28ebf00e805f378a232eb18597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 4 Jul 2014 20:22:10 +0100 Subject: [PATCH] videomixer: fix double unlock in segment seek segment code path We only want to unlock if we push an event downstream and jump to done_unlock label afterwards. We would also unlock in case of a segment seek and then unlock again later, and nothing good can come of that. (This code looks a bit dodgy anyway though, shouldn't it also bail out with FLOW_EOS here in case of a segment seek scenario, just without the event?) --- gst/videomixer/videomixer2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index 4471dc34a1..418005edc1 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -1246,8 +1246,8 @@ gst_videomixer2_collected (GstCollectPads * pads, GstVideoMixer2 * mix) if (output_end_time >= mix->segment.stop) { GST_DEBUG_OBJECT (mix, "Segment done"); - GST_VIDEO_MIXER2_UNLOCK (mix); if (!(mix->segment.flags & GST_SEGMENT_FLAG_SEGMENT)) { + GST_VIDEO_MIXER2_UNLOCK (mix); gst_pad_push_event (mix->srcpad, gst_event_new_eos ()); ret = GST_FLOW_EOS;