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 357404 - [playbin] Linking can fail silently
[playbin] Linking can fail silently
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal critical
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-09-24 03:49 UTC by René Stadler
Modified: 2006-09-25 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description René Stadler 2006-09-24 03:49:01 UTC
Playbin does not check if the linking to the app supplied sinks is successful.  See uses of gst_element_link_pads in gst-plugins-base/gst/playback/gstplaybin.c.
The problem with this is that it blindly assumes that the sink pad is named "sink".  This is probably fine for the converters it creates, but not for the user-supplied sinks.  I'm under the impression that element and pad names are mainly for easing debugging and documentation, they do not matter to the framework.

Solution: Check link success at least with an assertion or throw an error which is even better.  Link elements using gst_element_link, which does not depend on secret pad naming conventions if I'm correctly informed.  Should the current naming requirement be kept, mention it in the docs.

I just spent hours of wading through debug output to find out why an app would freeze over after a change so trivial I couldn't remember it or tested after including it (a simple pad name change!).  That's why this bug is such a bummer, you end up with a pipeline that never gets out of preroll without any error whatsoever.
Comment 1 Wim Taymans 2006-09-25 13:25:24 UTC
This should fix it:

        * gst/playback/gstplaybin.c: (gst_play_bin_class_init),
        (gst_play_bin_vis_blocked), (gst_play_bin_set_property),
        (gen_video_element), (gen_text_element), (gen_audio_element),
        (gen_vis_element), (remove_sinks), (add_sink), (setup_sinks),
        (gst_play_bin_set_clock_func), (gst_play_bin_change_state):
        Detect NO_PREROLL state change returns and disable clock distribution to
        the sinks so that sync is disabled.
        Avoid some type checking and do simple casts instead.
        Small cleanups, fix some FIXMEs.
        Be more robust when linking user specified elements, catch an report
        errors. Fixes #357404.
        Fix some leaks in the error paths.