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 583750 - Crash when playing with decodebin2 in pipeline.
Crash when playing with decodebin2 in pipeline.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
0.10.x
Other All
: Normal critical
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-24 22:19 UTC by A2K
Modified: 2009-05-27 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description A2K 2009-05-24 22:19:22 UTC
Steps to reproduce:
Try to run the code below. On third track you will get warning or crash.

import gobject
gobject.threads_init()

import gst

class Player():
    def __init__(self):
        self.player = gst.Pipeline("player")
        source = gst.element_factory_make("filesrc", "filesrc")
        decoder = gst.element_factory_make("decodebin2", "decodebin2")
        conv = gst.element_factory_make("audioconvert", "converter")
        volume = gst.element_factory_make("volume", "volume")
        sink = gst.element_factory_make("autoaudiosink", "alsa-output")

        self.player.add(source, decoder, conv, volume, sink)
        gst.element_link_many(source, decoder)
        gst.element_link_many(conv, volume, sink)

        def new_decode_pad(dbin, pad, islast):
            pad.link(conv.get_pad("sink"))
        decoder.connect("new-decoded-pad", new_decode_pad)

    def play_track(self, track):
        self.player.set_state(gst.STATE_NULL)
        self.player.get_by_name("filesrc").set_property("location", track)
        self.player.set_state(gst.STATE_PLAYING)


from time import sleep
p = Player()
p.play_track('track1.mp3')
sleep(3)
p.play_track('track2.mp3')
sleep(3)
p.play_track('track3.mp3')

sleep(10)

Stack trace:
Warning: invalid uninstantiatable type `(null)' in cast to `GObject'
  self.player.set_state(gst.STATE_PLAYING)
Warning: g_object_notify: assertion `G_IS_OBJECT (object)' failed
  self.player.set_state(gst.STATE_PLAYING)

Other information:
This happens only if using decodebin2.
Comment 1 A2K 2009-05-24 22:22:09 UTC
Same results with decodebin.
Comment 2 Wim Taymans 2009-05-27 16:17:29 UTC
This seems to fix things for decodebin2. I could however not find why exactly it was crashing.

commit 650215bcfda5c7ca6ec6d14f7442c7b32f94f636
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Wed May 27 18:12:10 2009 +0200

    decodebin2: remove leftover elements
    
    Remove all of the elements inside decodebin2 when goint to READY and NULL.
    Makes decodebin2 reusable.
    Fixes #583750