[vlc-devel] [PATCH] stream: iconv: convert only if we have a conversion descriptor
Shaleen Jain
shaleen.jain95 at gmail.com
Wed Jun 21 19:22:12 CEST 2017
---
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 );
--
2.13.1
More information about the vlc-devel
mailing list