[vlc-devel] [PATCH] switcher: Fix compilation with ffmpeg-0.10.2

Rafaël Carré funman at videolan.org
Wed Mar 21 03:25:10 CET 2012


Le 2012-03-20 21:58, Richard Grenville a écrit :
> Removes the deprecated symbols used in switcher.c to make it compile
> correctly against ffmpeg-0.10.2
> 
> I left the deprecated function call avcodec_encode_audio() unchanged
> since I guess I'm not capable to convert it to use the new
> avcodec_encode_audio2(), it requires too many changes.
> 
> Originally posted on: https://bugs.gentoo.org/show_bug.cgi?id=409001
> 
> I have no knowledge about the ffmpeg API, so please review the patch
> carefully, as I could not guarantee it's 100% correct.

This breaks building with older versions.

> ---
>  modules/stream_out/switcher.c |   21 ++++++++++-----------
>  1 files changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c
> index 372eef8..50c961f 100644
> --- a/modules/stream_out/switcher.c
> +++ b/modules/stream_out/switcher.c
> @@ -292,7 +292,6 @@ static int Open( vlc_object_t *p_this )
>      p_stream->pf_send   = Send;
>      p_stream->p_sys     = p_sys;
>  
> -    avcodec_init();
>      avcodec_register_all();

This code is probably incorrect (not reentrant iirc)



More information about the vlc-devel mailing list