summaryrefslogtreecommitdiff
path: root/ext/resindvd/resindvdsrc.c
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-10-16 01:09:49 +0100
committerJan Schmidt <thaytan@noraisin.net>2009-10-16 11:09:14 +0100
commit68621dfa561aa722d1439d0c0cddb2c511de1666 (patch)
treec1607d94ee290386c4834edcf7662d0d94a1a0f5 /ext/resindvd/resindvdsrc.c
parent53bc4d1803d72f65dcec91573e187c8e1bbce0c2 (diff)
downloadgstreamer-plugins-bad-68621dfa561aa722d1439d0c0cddb2c511de1666.tar.gz
resindvd: Re-send audio stream select on re-configuration
When the layout of the audio streams changes, re-send the current audio stream selection event, in order to trigger switching to the new stream properly. https://bugzilla.gnome.org/show_bug.cgi?id=575568
Diffstat (limited to 'ext/resindvd/resindvdsrc.c')
-rw-r--r--ext/resindvd/resindvdsrc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index 998cfa5f7..07162aad1 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -1814,6 +1814,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src)
audio_attr_t *a_attrs;
subp_attr_t *s_attrs;
gint n_audio, n_subp;
+ int8_t cur_audio;
GstStructure *s;
GstEvent *e;
gint i;
@@ -1868,6 +1869,8 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src)
NULL);
/* audio */
+ cur_audio = dvdnav_get_active_audio_stream (src->dvdnav);
+
have_audio = FALSE;
for (i = 0; i < n_audio; i++) {
const audio_attr_t *a = a_attrs + i;
@@ -1881,7 +1884,11 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src)
GST_DEBUG_OBJECT (src, "mapped logical audio %d to MPEG substream %d",
i, phys_id);
-
+ /* Force audio stream reselection in case format changed ... */
+ if (i == cur_audio) {
+ src->cur_audio_phys_stream = -1;
+ rsn_dvdsrc_prepare_audio_stream_event (src, i, phys_id);
+ }
#if 0
/* FIXME: Only output A52 streams for now, until the decoder switching
* is ready */