From 4d5a48db9779ac1ff4cfda42a5180f8bc1462882 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 27 May 2009 22:54:51 +0100 Subject: resindvd: Create all the audio streams of all formats Enable creation of the demuxer pads for all audio streams, even types we don't yet support. This means that unsupported types (LPCM, DTS) are output, but not linked to anything yet. If only unsupported streams are available, the user hears silence instead of having the pipeline not pre-roll correctly. This is a prerequisite for hooking up the automatic decoder switching. --- ext/resindvd/resindvdsrc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ext/resindvd/resindvdsrc.c') diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index f24e45aa..122f2b67 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1882,7 +1882,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) GST_DEBUG_OBJECT (src, "mapped logical audio %d to MPEG substream %d", i, phys_id); -#if 1 +#if 0 /* FIXME: Only output A52 streams for now, until the decoder switching * is ready */ if (a->audio_format != 0) { @@ -1891,7 +1891,8 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) continue; } #endif - have_audio = TRUE; + if (a->audio_format == 0) + have_audio = TRUE; GST_DEBUG_OBJECT (src, "Audio stream %d is format %d, substream %d", i, (int) a->audio_format, phys_id); @@ -1917,7 +1918,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) } if (have_audio == FALSE) { - /* Always create at least one audio stream */ + /* Always create at least one audio stream of the required type */ gst_structure_set (s, "audio-0-format", G_TYPE_INT, (int) 0, "audio-0-stream", G_TYPE_INT, (int) 0, NULL); } -- cgit v1.2.1