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 584020 - [playbin2] inadvertently resets configured audio/video sinks
[playbin2] inadvertently resets configured audio/video sinks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-27 16:50 UTC by Tim-Philipp Müller
Modified: 2009-05-28 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2009-05-27 16:50:31 UTC
Wanted to make totem output to SPDIF, but somehow totem kept outputting to the normal speakers. Turns out the configured audiosink(bin) is inadvertently being discarded in no_more_pads():

  ...
  /* if we have custom sinks, configure them now */
  GST_SOURCE_GROUP_LOCK (group);
  GST_LOG_OBJECT (playbin, "setting custom audio sink %p",
      group->audio_sink);
  gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_AUDIO,
      group->audio_sink);
  GST_LOG_OBJECT (playbin, "setting custom video sink %p", group->video_sink);
  gst_play_sink_set_sink (playbin->playsink, GST_PLAY_SINK_TYPE_VIDEO,
      group->video_sink);
  ...

Since no custom sinks (that handle e.g. mp3 or so) are being used here, this will just overwrite the configured sinks with NULL, which means playbin2 will default to autoaudiosink/autovideosink as if the gconf sinks were never set up.
Comment 1 Tim-Philipp Müller 2009-05-28 14:42:43 UTC
Should be fixed now:

commit 7620d8800de108a686c61f64787e27e98bfaf3e2
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Thu May 28 15:21:42 2009 +0100

    playbin2: actually use configured audio/video sinks
    
    playbin2 inadvertently used autoaudiosink and autovideosink up to now,
    since it would overwrite the sinks configured via the "audio-sink"
    and "video-sink" properties with the stream-specific group sinks when
    configuring the outputs. Those are usually NULL however, so that would
    overwrite the configured sinks with NULL which makes playbin2 then
    default to the auto sinks. Fix this by keeping a reference to each
    configured sink in playbin2 and setting up the right sinks depending
    on whether there is a stream-specific sink or not.
    
    Fixes #584020.