[vlc-devel] [PATCH] audio_output: Correctly initialize audio filter es_format_t

Rémi Denis-Courmont remi at remlab.net
Wed Jul 12 16:50:53 CEST 2017


Le 12 juillet 2017 21:53:23 GMT+08:00, "Hugo Beauzée-Luyssen" <hugo at beauzee.fr> a écrit :
>---
> src/audio_output/filters.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
>index 2e6ad1bc5a..b94b06547e 100644
>--- a/src/audio_output/filters.c
>+++ b/src/audio_output/filters.c
>@@ -52,10 +52,10 @@ static filter_t *CreateFilter (vlc_object_t *obj,
>const char *type,
>         return NULL;
> 
>     filter->owner.sys = owner;
>+    es_format_Init(&filter->fmt_in, AUDIO_ES, infmt->i_format);
>     filter->fmt_in.audio = *infmt;
>-    filter->fmt_in.i_codec = infmt->i_format;
>+    es_format_Init(&filter->fmt_out, AUDIO_ES, outfmt->i_format);
>     filter->fmt_out.audio = *outfmt;
>-    filter->fmt_out.i_codec = outfmt->i_format;
> 
> #ifndef NDEBUG
>     /* Assure that infmt/oufmt are well prepared and that channels
>-- 
>2.11.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

In principles, an audio filter only looks at the audio union member, hence the current code.
-- 
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170712/1b3511b9/attachment.html>


More information about the vlc-devel mailing list