]> git.sesse.net Git - vlc/commitdiff
aout: tolerate lack of a resampler if the input and output rates match
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Nov 2012 20:32:26 +0000 (22:32 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Nov 2012 20:32:26 +0000 (22:32 +0200)
Synchronization will not be so good (as with S/PDIF), but audio will
still work. Anyway, this should hardly ever happen since the ugly
resampler supports all linear formats.

src/audio_output/filters.c

index 06ba42d82109f607dba55733313ce661a3cf2eff..115925acce6f763905a3ac84e6551586cab74614 100644 (file)
@@ -574,7 +574,7 @@ int aout_FiltersNew (audio_output_t *aout,
     assert (AOUT_FMTS_IDENTICAL(&output_format, outfmt));
     owner->resampler = FindResampler (VLC_OBJECT(aout), &input_format,
                                       &output_format);
-    if (owner->resampler == NULL)
+    if (owner->resampler == NULL && input_format.i_rate != outfmt->i_rate)
     {
         msg_Err (aout, "cannot setup a resampler");
         goto error;