From: Jan Schmidt Date: Fri, 16 Oct 2009 00:09:49 +0000 (+0100) Subject: resindvd: Re-send audio stream select on re-configuration X-Git-Tag: 1.19.3~507^2~17934 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68621dfa561aa722d1439d0c0cddb2c511de1666;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 998cfa5f71..07162aad12 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 */