[vlc-devel] [PATCH] stream: iconv: convert only if we have a conversion descriptor
Shaleen Jain
shaleen.jain95 at gmail.com
Wed Jun 21 19:55:37 CEST 2017
How so?
On Wed, Jun 21, 2017 at 11:08 PM, Rémi Denis-Courmont
<remi at remlab.net> wrote:
> 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/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170621/d17c689e/attachment.html>
More information about the vlc-devel
mailing list