]> git.sesse.net Git - vlc/blobdiff - src/video_output/video_output.c
macosx/framework: Only fetch meta when needed.
[vlc] / src / video_output / video_output.c
index d7a92f8e8d87bd0b4477aa1a8a1b729257894b7b..edb78f1ad0fd8b46e372c4390b7047f9501d607f 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 #include <stdlib.h>                                                /* free() */
@@ -194,7 +198,6 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
 
         if( ( p_vout->fmt_render.i_width != p_fmt->i_width ) ||
             ( p_vout->fmt_render.i_height != p_fmt->i_height ) ||
-            ( p_vout->fmt_render.i_chroma != p_fmt->i_chroma ) ||
             ( p_vout->fmt_render.i_aspect != p_fmt->i_aspect ) ||
             p_vout->b_filter_change )
         {
@@ -395,7 +398,7 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
     p_vout->p_cfg = p_cfg;
     p_vout->p_module = module_Need( p_vout,
         ( p_vout->psz_filter_chain && *p_vout->psz_filter_chain ) ?
-        "video filter" : "video output", psz_name, 0 );
+        "video filter" : "video output", psz_name, p_vout->psz_filter_chain && *p_vout->psz_filter_chain );
     free( psz_name );
 
     if( p_vout->p_module == NULL )
@@ -1647,10 +1650,10 @@ static void DisplayTitleOnOSD( vout_thread_t *p_vout )
         char *psz_artist = input_item_GetArtist( input_GetItem( p_input ) );
         char *psz_name = input_item_GetTitle( input_GetItem( p_input ) );
         if( EMPTY_STR( psz_name ) )
-            {
-                free( psz_name );
-                psz_name = input_item_GetName( input_GetItem( p_input ) );
-            }
+        {
+            free( psz_name );
+            psz_name = input_item_GetName( input_GetItem( p_input ) );
+        }
         if( !EMPTY_STR( psz_nowplaying ) )
         {
             vout_ShowTextAbsolute( p_vout, DEFAULT_CHAN,
@@ -1665,12 +1668,8 @@ static void DisplayTitleOnOSD( vout_thread_t *p_vout )
         else if( !EMPTY_STR( psz_artist ) )
         {
             char *psz_string = NULL;
-
-            psz_string = malloc( strlen( psz_name ) + strlen( psz_artist ) );
-            if( psz_string )
+            if( asprintf( &psz_string, "%s - %s", psz_name, psz_artist ) != -1 )
             {
-                sprintf( psz_string, "%s - %s", psz_name, psz_artist );
-
                 vout_ShowTextAbsolute( p_vout, DEFAULT_CHAN,
                                        psz_string, NULL,
                                        p_vout->i_title_position,
@@ -1699,3 +1698,4 @@ static void DisplayTitleOnOSD( vout_thread_t *p_vout )
         free( psz_nowplaying );
     }
 }
+