[vlc-devel] [PATCH] stream: iconv: convert only if we have a conversion descriptor
Rémi Denis-Courmont
remi at remlab.net
Wed Jun 21 19:38:30 CEST 2017
Le keskiviikkona 21. kesäkuuta 2017, 22.52.12 EEST Shaleen Jain a écrit :
> ---
> src/input/stream.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/input/stream.c b/src/input/stream.c
> index ac4073dc06..f5cc213a09 100644
> --- a/src/input/stream.c
> +++ b/src/input/stream.c
> @@ -318,7 +318,8 @@ char *vlc_stream_ReadLine( stream_t *s )
> p_in = p_line;
> p_out = psz_new_line;
>
> - if( vlc_iconv( priv->text.conv, &p_in, &i_in, &p_out, &i_out )
> == (size_t)-1 ) + if( priv->text.conv != (vlc_iconv_t)(-1) &&
> + vlc_iconv( priv->text.conv, &p_in, &i_in, &p_out,
> &i_out ) == (size_t)-1 ) {
> msg_Err( s, "conversion error: %s", vlc_strerror_c( errno )
> ); msg_Dbg( s, "original: %d, in %zu, out %zu", i_line, i_in, i_out );
The logic is still flawed.
--
雷米‧德尼-库尔蒙
https://www.remlab.net/
More information about the vlc-devel
mailing list