]> git.sesse.net Git - vlc/blobdiff - modules/codec/subtitles/subsdec.c
Merge branch 1.0-bugfix
[vlc] / modules / codec / subtitles / subsdec.c
index 5dbc8471966e404445f054f4e0a88ed0546f5ab0..f217f0b77e244effe9cd8e718a68939c6f68a15d 100644 (file)
@@ -234,7 +234,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     {
         case VLC_CODEC_SUBT:
         case VLC_CODEC_SSA:
-        case VLC_FOURCC('t','1','4','0'):
+        case VLC_CODEC_ITU_T140:
             break;
         default:
             return VLC_EGENERIC;
@@ -262,14 +262,15 @@ static int OpenDecoder( vlc_object_t *p_this )
     char *psz_charset = NULL;
 
     /* First try demux-specified encoding */
-    if( p_dec->fmt_in.i_codec == VLC_FOURCC('t','1','4','0') )
+    if( p_dec->fmt_in.i_codec == VLC_CODEC_ITU_T140 )
         psz_charset = strdup( "UTF-8" ); /* IUT T.140 is always using UTF-8 */
     else
     if( p_dec->fmt_in.subs.psz_encoding && *p_dec->fmt_in.subs.psz_encoding )
     {
         psz_charset = strdup (p_dec->fmt_in.subs.psz_encoding);
         msg_Dbg (p_dec, "trying demuxer-specified character encoding: %s",
-                 p_dec->fmt_in.subs.psz_encoding ?: "not specified");
+                 p_dec->fmt_in.subs.psz_encoding ?
+                 p_dec->fmt_in.subs.psz_encoding : "not specified");
     }
 
     /* Second, try configured encoding */
@@ -277,7 +278,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     {
         psz_charset = var_CreateGetNonEmptyString (p_dec, "subsdec-encoding");
         msg_Dbg (p_dec, "trying configured character encoding: %s",
-                 psz_charset ?: "not specified");
+                 psz_charset ? psz_charset : "not specified");
     }
 
     /* Third, try "local" encoding with optional UTF-8 autodetection */
@@ -285,7 +286,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     {
         psz_charset = strdup (GetFallbackEncoding ());
         msg_Dbg (p_dec, "trying default character encoding: %s",
-                 psz_charset ?: "not specified");
+                 psz_charset ? psz_charset : "not specified");
 
         if (var_CreateGetBool (p_dec, "subsdec-autodetect-utf8"))
         {