[gst 1.2.2] remove a request pad from videomixer cause SEGFAULT

Sebastian Dröge sebastian at centricular.com
Thu Jan 23 00:11:26 PST 2014


On Mi, 2014-01-22 at 17:51 -0200, Lautaro Woites wrote:
> Hi again folks,
> 
> I have this pipe: videotestsrc ! capsfilter ! videomixer ! xvimagesink.
> Then on PLAYING STATE I do:
> 
> while (TRUE){
>     sleep(2);
>     add_mixer_input(); //adds an input on the videomixer
>     sleep(2);
>     remove_mixer_input(); //removes the previously added input to the mixer.
> }
> 
> The inputs are bins with videotestsrc and a capsfilter. The example runs
> for a time (sometimes 5 minutes, sometimes 30 min, others 10 seconds) and
> then produces a segmentation fault on the videomixer (at
> gst_collect_pads_check_collected:1031).
> 
> This is what I do to remove the input:
>      a) I  block the videotestsrc's src pad.
>      b) I send an EOS event to the capsfilter's sink pad and I wait for the
> event on the bin's src pad ( with an event probe).
>      c) On the  event probe's callback I drop the EOS and I unlink the bin
> with the mixer.
>      d) I set the bin to STATE_NULL and I remove it from the pipe.
>      e) I call release_request_pad on the mixer.
>      f) I remove the block pad on the videotestsrc.
> Also I've tried: to send EOS to the videtestsrc - set the bin to STATE_NULL
> and remove it - and finally call release_request_pad on the mixer.
> The program  crashed in the same line .
> 
> NOTE:   If I remove the call to gst_release_request_pad the program seems
> to work OK. But the mixer's will still having unused sink pads :(.

The sequence of actions sounds correct

> I have some question about this:
>    1) I don't know if I am missing something or if there is a bug.
>    2) If I'm doing something wrong, What's the correct/safest  protocol to
> remove an input from the mixer?.
>    3) is it related with this ticket:
> https://bugzilla.gnome.org/show_bug.cgi?id=701110 ?

It might indeed be this bug, but then it wouldn't happen always. Could
you attach a testcase to that bug that reproduces the crash? What you're
doing is supposed to work and definitely should not crash.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140123/4298b875/attachment.pgp>


More information about the gstreamer-devel mailing list