After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740616 - decklinksink: crash on recreation
decklinksink: crash on recreation
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal critical
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-24 11:40 UTC by Dušan Poizl
Modified: 2014-11-28 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dušan Poizl 2014-11-24 11:40:33 UTC
If I create pipeline with decklinksink it run fine on first run. Then I stop that pipeline with EOS. 
After that when I tear down the pipeline and setup new one it crash on gst_element_set_state(pipeline, GST_STATE_PLAYING).
Backtrace show that it crash in gstdecklinksink.cpp - gst_decklink_sink_start() on line

decklinksink->output->SetAudioCallback (decklinksink->callback);

It doesn't crash anymore if I comment out gstdecklink.cpp:217 inited = TRUE; in init_device() method.
Comment 1 Sebastian Dröge (slomo) 2014-11-24 11:50:53 UTC
I can confirm this, but not 100% sure why this would happen yet.
Comment 2 Sebastian Dröge (slomo) 2014-11-28 13:52:14 UTC
commit ee8766b342a9feb68f1e1ed4947db1f3ca5660b3
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Nov 28 14:50:18 2014 +0100

    decklinksrc: Handle callback/delegate object the same way as in the sink
    
    Potentially fixes crashes.

commit 2a0123d79a86b4d22a147cebf5cdb9c80158ef87
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Nov 28 14:46:06 2014 +0100

    decklinksink: Don't crash when going to READY another time
    
    We have to handle the callback object a bit different:
    a) it needs a virtual destructor
    b) we need to set the callback to NULL when we're done with the output
    c) create a new one every time
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740616