videomixer problems

Lautaro Woites lauchapc87 at
Mon Feb 17 11:47:01 PST 2014

2014-02-17 12:59 GMT-03:00 Krzysztof Borowczyk <k.borowczyk at>:

> t_sync_state_with_parent(branch);

I had some trouble with videomixer and dynamic releasing of pads. Maybe is
similar to your case.
My pipe is a videomixer with 2 filesrc inputs. When I change one of the
inputs, the pipeline freezes because of deadlock (this occurs sometimes).
Tracing the videomixer and collectpads code I found that the deadlock was
produced by the chain function of one of the sinks (on collectpads.c) and
the release_request_pad code on the other sink_pad (on videomixer.c).

I don't remember exactly the  code but the problem occurs when this
sequence succeeds:

1) gst_collect_pads_chain function acquires GST_COLLECT_PADS_STREAM_LOCK.
2) gst_videomixer2_release_pad function acquires GST_VIDEO_MIXER2_LOCK.
2 )gst_collect_pads_chain function calls to gst_videomixer2_collected()
3) gst_videomixer2_collected() function tries to acquire
4) gst_videomixer2_release_pad() function tries to acquire

So, gst_videomixer2_release_pad waits on COLLECT_PADS_STREAM_LOCK (acquired
by gst_videomixer2_collected) and gst_videomixer2_collected waits on
GST_VIDEO_MIXER2_LOCK(acquired by gst_videomixer2_release_pad).

I've also attached an
reproduces this behaviour. Sometimes this example produces a segfault.
When the segfault doesn't occurs the videomixer runs a nondeterministic
amount of time and then freezes.

If the gstreamer's guys want I can create a new bug or update the already
uploaded bug.
Also I can try to make a fix.

Hope it helps.

P.D: on this thread<>I've
talked with sebastian about this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list