GNOME Bugzilla – Bug 584020
[playbin2] inadvertently resets configured audio/video sinks
Last modified: 2009-05-28 14:42:43 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.
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.