X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fvideo_output%2Fvout_subpictures.c;h=11a1fd87d07ff4fb215d2f3917d3cc8c8e99246c;hb=f8f8faa6a6655200f76031eb23595be0e7a63b6a;hp=58680f26e482714edae50ccac512f03dde1e485a;hpb=24c96490ebea5843e389de91b87670b408b3267c;p=vlc diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 58680f26e4..11a1fd87d0 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -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 );