<div dir="ltr"><div>Hi again folks,<br><br>I have this pipe: videotestsrc ! capsfilter ! videomixer ! xvimagesink.<br>Then on PLAYING STATE I do:<br><br>while (TRUE){<br> sleep(2);<br> add_mixer_input(); //adds an input on the videomixer<br>
sleep(2);<br> remove_mixer_input(); //removes the previously added input to the mixer.<br>}<br><br>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).<br>
<br>This is what I do to remove the input:<br> a) I block the videotestsrc's src pad.<br> 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).<br>
c) On the event probe's callback I drop the EOS and I unlink the bin with the mixer.<br> d) I set the bin to STATE_NULL and I remove it from the pipe.<br> e) I call release_request_pad on the mixer.<br> f) I remove the block pad on the videotestsrc.<br>
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. <br>The program crashed in the same line .<br><br></div><div>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 :(.</div><div><br>I have some question about this:<br> 1) I don't know if I am missing something or if there is a bug.<br> 2) If I'm doing something wrong, What's the correct/safest protocol to remove an input from the mixer?.<br>
3) is it related with this ticket: <a href="https://bugzilla.gnome.org/show_bug.cgi?id=701110">https://bugzilla.gnome.org/show_bug.cgi?id=701110</a> ?<br><br><br>I've attached an example program. In my PC if I want to blow up the program faster I ran it with GST_DEBUG=4.<br>
<br></div><br><div><div><br>The complete backtrace is:<br>(gdb) bt<br>#0 0x0000000000000000 in ?? ()<br>#1 0x00007f64932efc90 in ?? () from /usr/lib/gstreamer-1.0/libgstvideomixer.so<br>#2 0x00007f64932f0ca1 in ?? () from /usr/lib/gstreamer-1.0/libgstvideomixer.so<br>
#3 0x00007f6493e285f7 in gst_collect_pads_check_collected (pads=pads@entry=0x105d0d0) at gstcollectpads.c:1301<br>#4 0x00007f6493e29a88 in gst_collect_pads_chain (pad=0x106a040, parent=<optimized out>, buffer=0x106cbe0) at gstcollectpads.c:2023<br>
#5 0x00007f6495b87d78 in gst_pad_chain_data_unchecked (data=0x106cbe0, type=4112, pad=0x106a040) at gstpad.c:3711<br>#6 gst_pad_push_data (pad=0x104a960, type=type@entry=4112, data=<optimized out>) at gstpad.c:3941<br>
#7 0x00007f6495b8e8c6 in gst_pad_push (pad=<optimized out>, buffer=<optimized out>) at gstpad.c:4044<br>#8 0x00007f6493e220b9 in gst_base_transform_chain (pad=<optimized out>, parent=0x10573d0, buffer=<optimized out>) at gstbasetransform.c:2237<br>
#9 0x00007f6495b87d78 in gst_pad_chain_data_unchecked (data=0x106cbe0, type=4112, pad=0x104a730) at gstpad.c:3711<br>#10 gst_pad_push_data (pad=0x104a500, type=type@entry=4112, data=<optimized out>) at gstpad.c:3941<br>
#11 0x00007f6495b8e8c6 in gst_pad_push (pad=<optimized out>, buffer=<optimized out>) at gstpad.c:4044<br>#12 0x00007f6493e220b9 in gst_base_transform_chain (pad=<optimized out>, parent=0x10500f0, buffer=<optimized out>) at gstbasetransform.c:2237<br>
#13 0x00007f6495b87d78 in gst_pad_chain_data_unchecked (data=0x106cbe0, type=4112, pad=0x104a2d0) at gstpad.c:3711<br>#14 gst_pad_push_data (pad=pad@entry=0x104a0a0, type=type@entry=4112, data=<optimized out>) at gstpad.c:3941<br>
#15 0x00007f6495b8e8c6 in gst_pad_push (pad=pad@entry=0x104a0a0, buffer=<optimized out>) at gstpad.c:4044<br>#16 0x00007f6493e1a515 in gst_base_src_loop (pad=0x104a0a0) at gstbasesrc.c:2779<br>#17 0x00007f6495bb5439 in gst_task_func (task=0x1079050) at gsttask.c:316<br>
#18 0x00007f6495643976 in ?? () from /usr/lib/libglib-2.0.so.0<br>#19 0x00007f6495642fb5 in ?? () from /usr/lib/libglib-2.0.so.0<br>#20 0x00007f64953c10a2 in start_thread () from /usr/lib/libpthread.so.0<br>#21 0x00007f64950f432d in clone () from /usr/lib/libc.so.6<br>
<br>Thanks again <br></div></div></div>