]> git.sesse.net Git - vlc/blobdiff - modules/demux/subtitle_asa.c
Sync PO files
[vlc] / modules / demux / subtitle_asa.c
index cd6f4f79ee8afb8bb1a0f416b0c6424b8f85783b..89015e8b8568bc10776713a69463ba51713007c4 100644 (file)
@@ -140,6 +140,8 @@ static int Open ( vlc_object_t *p_this )
     p_demux->pf_demux = Demux;
     p_demux->pf_control = Control;
     p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
+    if( !p_sys  )
+        return VLC_ENOMEM;
     p_sys->psz_header         = NULL;
     p_sys->i_subtitle         = 0;
     p_sys->i_subtitles        = 0;
@@ -210,7 +212,7 @@ static int Open ( vlc_object_t *p_this )
     }
     if( !p_detect->fmt )
     {
-        msg_Err( p_demux, "detected %s subtitle format, no asa support" );
+        msg_Err( p_demux, "detected %s subtitle format, no asa support", p_detect->name );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -220,7 +222,6 @@ static int Open ( vlc_object_t *p_this )
     p_data = malloc( i_ssize );
     if( !p_data )
     {
-        msg_Err( p_demux, "out of memory");
         free( p_sys );
         return VLC_ENOMEM;
     }
@@ -275,13 +276,14 @@ static int ProcessLine( demux_t *p_demux, void *p_arg,
     subtitle_t *p_subtitle;
     char *psz_text;
 
+    VLC_UNUSED(p_arg);
+
     if( p_sys->i_subtitles >= p_sys->i_subs_alloc )
     {
         p_sys->i_subs_alloc += 500;
         if( !( p_sys->subtitle = realloc( p_sys->subtitle, sizeof(subtitle_t)
                                           * p_sys->i_subs_alloc ) ) )
         {
-            msg_Err( p_demux, "out of memory");
             return VLC_ENOMEM;
         }
     }