vlc | branch: master | Pierre Ynard <[email protected]> | Tue Oct 27 08:44:29 2020 +0100| [520e79aa6e9d68de56352f701cd6eae7141cf20f] | committer: Pierre Ynard
stream_ReadLine: don't gratuitiously close iconv handle on unrelated error The only errors after which this was called were memory allocation errors, lines too long, or failing to open the handle itself, so obviously there is no reason to want to close it there; it already gets closed in the proper place when the stream is destroyed. Even worse, it left the handle missing if vlc_stream_ReadLine() was called again, and would result in text conversion constantly failing and no output getting returned anymore, rendering the rest of the stream unusable through this API and precluding any error recovery. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=520e79aa6e9d68de56352f701cd6eae7141cf20f --- src/input/stream.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/input/stream.c b/src/input/stream.c index 90651de058..65e1e241f3 100644 --- a/src/input/stream.c +++ b/src/input/stream.c @@ -370,13 +370,6 @@ char *vlc_stream_ReadLine( stream_t *s ) error: /* We failed to read any data, probably EOF */ free( p_line ); - - /* */ - if( priv->text.conv != (vlc_iconv_t)(-1) ) - { - vlc_iconv_close( priv->text.conv ); - priv->text.conv = (vlc_iconv_t)(-1); - } return NULL; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
