[vlc-commits] aout: fix missing S/PDIF encapsulation

Rémi Denis-Courmont git at videolan.org
Sat Dec 15 18:03:38 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 15 19:03:23 2012 +0200| [6a5c7b9820321011a745474790381308592a3285] | committer: Rémi Denis-Courmont

aout: fix missing S/PDIF encapsulation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a5c7b9820321011a745474790381308592a3285
---

 src/audio_output/filters.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index 115925a..caf7b9a 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -141,11 +141,7 @@ static int aout_FiltersPipelineCreate(vlc_object_t *obj, filter_t **filters,
         if (n == max)
             goto overflow;
 
-        filter_t *f = NULL;
-        if (!AOUT_FMT_LINEAR(outfmt))
-           f = TryFormat (obj, outfmt->i_format, &input);
-        if (f == NULL)
-            f = TryFormat (obj, VLC_CODEC_FI32, &input);
+        filter_t *f = TryFormat (obj, VLC_CODEC_FI32, &input);
         if (f == NULL)
             f = TryFormat (obj, VLC_CODEC_FL32, &input);
         if (f == NULL)
@@ -485,7 +481,20 @@ int aout_FiltersNew (audio_output_t *aout,
     var_AddCallback (aout, "equalizer", EqualizerCallback, NULL);
 
     if (!AOUT_FMT_LINEAR(outfmt))
+    {   /* Non-linear output: just convert formats, no filters/visu */
+        if (!AOUT_FMTS_IDENTICAL(infmt, outfmt))
+        {
+            aout_FormatsPrint (aout, "pass-through:", infmt, outfmt);
+            owner->filters[0] = FindConverter(VLC_OBJECT(aout), infmt, outfmt);
+            if (owner->filters[0] == NULL)
+            {
+                msg_Err (aout, "cannot setup pass-through");
+                goto error;
+            }
+            owner->nb_filters++;
+        }
         return 0;
+    }
 
     const char *scaletempo =
         var_InheritBool (aout, "audio-time-stretch") ? "scaletempo" : NULL;



More information about the vlc-commits mailing list