]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_subpictures.c
OSD: remoev leading underscores
[vlc] / src / video_output / vout_subpictures.c
index 58680f26e482714edae50ccac512f03dde1e485a..11a1fd87d07ff4fb215d2f3917d3cc8c8e99246c 100644 (file)
@@ -184,12 +184,14 @@ static void FilterRelease( filter_t *p_filter );
 /*****************************************************************************
  * Public API
  *****************************************************************************/
+
+#undef spu_Create
 /**
  * Creates the subpicture unit
  *
  * \param p_this the parent object which creates the subpicture unit
  */
-spu_t *__spu_Create( vlc_object_t *p_this )
+spu_t *spu_Create( vlc_object_t *p_this )
 {
     spu_t *p_spu;
     spu_private_t *p_sys;
@@ -214,7 +216,7 @@ spu_t *__spu_Create( vlc_object_t *p_this )
     p_sys->p_scale = NULL;
     p_sys->p_scale_yuvp = NULL;
 
-    p_sys->i_margin = config_GetInt( p_spu, "sub-margin" );
+    p_sys->i_margin = var_InheritInteger( p_spu, "sub-margin" );
 
     /* Register the default subpicture channel */
     p_sys->i_channel = 2;
@@ -475,16 +477,8 @@ void spu_RenderSubpictures( spu_t *p_spu,
         p_region = p_subpic->p_region;
         if( !p_region->fmt.i_sar_num || !p_region->fmt.i_sar_den )
         {
-            if( p_region->fmt.i_aspect != 0 )
-            {
-                p_region->fmt.i_sar_den = p_region->fmt.i_aspect;
-                p_region->fmt.i_sar_num = VOUT_ASPECT_FACTOR;
-            }
-            else
-            {
-                p_region->fmt.i_sar_den = p_fmt_dst->i_sar_den;
-                p_region->fmt.i_sar_num = p_fmt_dst->i_sar_num;
-            }
+            p_region->fmt.i_sar_den = p_fmt_dst->i_sar_den;
+            p_region->fmt.i_sar_num = p_fmt_dst->i_sar_num;
         }
 
         /* Take care of the aspect ratio */
@@ -778,7 +772,6 @@ subpicture_t *subpicture_NewFromPicture( vlc_object_t *p_obj,
     p_subpic->i_original_picture_width  = fmt_out.i_width;
     p_subpic->i_original_picture_height = fmt_out.i_height;
 
-    fmt_out.i_aspect = 0;
     fmt_out.i_sar_num =
     fmt_out.i_sar_den = 0;
 
@@ -965,7 +958,6 @@ static void FilterRelease( filter_t *p_filter )
     if( p_filter->p_module )
         module_unneed( p_filter, p_filter->p_module );
 
-    vlc_object_detach( p_filter );
     vlc_object_release( p_filter );
 }
 
@@ -1035,8 +1027,8 @@ static filter_t *CreateAndLoadScale( vlc_object_t *p_obj,
     p_scale->fmt_out.video.i_width =
     p_scale->fmt_out.video.i_height = b_resize ? 16 : 32;
 
-    p_scale->pf_vout_buffer_new = spu_new_video_buffer;
-    p_scale->pf_vout_buffer_del = spu_del_video_buffer;
+    p_scale->pf_video_buffer_new = spu_new_video_buffer;
+    p_scale->pf_video_buffer_del = spu_del_video_buffer;
 
     vlc_object_attach( p_scale, p_obj );
     p_scale->p_module = module_need( p_scale, "video filter2", NULL, false );