]> git.sesse.net Git - vlc/commitdiff
* modules/codec/spudec/spudec.c: proper initialization of the iconv handle.
authorGildas Bazin <gbazin@videolan.org>
Wed, 16 Jul 2003 17:17:05 +0000 (17:17 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 16 Jul 2003 17:17:05 +0000 (17:17 +0000)
modules/codec/spudec/spudec.c

index 367129f983cceae2e9f56d63fb2bc81b2a8dfedd..3548a89213830b9666d81b30739186ed50351544 100644 (file)
@@ -2,7 +2,7 @@
  * spudec.c : SPU decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spudec.c,v 1.20 2003/07/14 21:32:58 sigmunau Exp $
+ * $Id: spudec.c,v 1.21 2003/07/16 17:17:05 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -121,6 +121,7 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
      */
     p_spudec->p_vout = NULL;
     p_spudec->p_fifo = p_fifo;
+    p_spudec->iconv_handle = (iconv_t)-1;
 
     /*
      * Initialize thread and free configuration
@@ -159,7 +160,8 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
         }
 #endif
 #if defined(HAVE_ICONV)
-       p_spudec->iconv_handle = iconv_open( "UTF-8", config_GetPsz( p_spudec->p_fifo, "spudec-encoding" ) );
+       p_spudec->iconv_handle = iconv_open( "UTF-8",
+            config_GetPsz( p_spudec->p_fifo, "spudec-encoding" ) );
        if( p_spudec->iconv_handle == (iconv_t)-1 )
        {
            msg_Warn( p_spudec->p_fifo, "Unable to do requested conversion" );