[vlc-devel] [PATCH] sout: transcode: check linear format after assignment

Steve Lhomme robux4 at ycbcr.xyz
Mon Oct 7 08:40:27 CEST 2019


LGTM

On 2019-10-04 5:40, quinkblack at foxmail.com wrote:
> From: Zhao Zhili <zhilizhao at tencent.com>
> 
> fix flac transcode failure
> ---
>   modules/stream_out/transcode/audio.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
> index 9d2c956b04..edc683a2e1 100644
> --- a/modules/stream_out/transcode/audio.c
> +++ b/modules/stream_out/transcode/audio.c
> @@ -43,12 +43,12 @@ static int audio_update_format( decoder_t *p_dec )
>       struct decoder_owner *p_owner = dec_get_owner( p_dec );
>       sout_stream_id_sys_t *id = p_owner->id;
>   
> -    if( !AOUT_FMT_LINEAR(&p_dec->fmt_out.audio) )
> -        return VLC_EGENERIC;
> -
>       p_dec->fmt_out.audio.i_format = p_dec->fmt_out.i_codec;
>       aout_FormatPrepare( &p_dec->fmt_out.audio );
>   
> +    if( !AOUT_FMT_LINEAR(&p_dec->fmt_out.audio) )
> +        return VLC_EGENERIC;
> +
>       vlc_mutex_lock(&id->fifo.lock);
>       es_format_Clean( &id->decoder_out );
>       es_format_Copy( &id->decoder_out, &p_dec->fmt_out );
> -- 
> 2.17.1
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list