[vlc-devel] [PATCH 3/3] resampler: src: ensure fmt_out is correctly set

Tristan Matthews tmatth at videolan.org
Sun Feb 21 05:13:10 UTC 2021


---
 modules/audio_filter/resampler/src.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/audio_filter/resampler/src.c b/modules/audio_filter/resampler/src.c
index 51b955f408..db832f5019 100644
--- a/modules/audio_filter/resampler/src.c
+++ b/modules/audio_filter/resampler/src.c
@@ -110,6 +110,9 @@ static int OpenResampler (vlc_object_t *obj)
     filter->ops = &filter_ops;
     filter->p_sys = s;
 
+    /* Ensure bitspersample + bytes_per_frame are correctly set */
+    aout_FormatPrepare(&filter->fmt_out.audio);
+
     return VLC_SUCCESS;
 }
 
-- 
2.25.1



More information about the vlc-devel mailing list