X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Faudiobargraph_v.c;h=156b0ec1747981e961e184c0fffe10556d0ad8a6;hb=6249f42136e40e7dbb4fd2eb03cefe98b0f2f8b0;hp=269fed2cc21252b8003c60378d34b56ccbc5b0f8;hpb=4f2f56a58c2552cd77f3d6bc3056234e244e4e3e;p=vlc diff --git a/modules/video_filter/audiobargraph_v.c b/modules/video_filter/audiobargraph_v.c index 269fed2cc2..156b0ec174 100644 --- a/modules/video_filter/audiobargraph_v.c +++ b/modules/video_filter/audiobargraph_v.c @@ -28,7 +28,6 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include #include #include @@ -36,7 +35,6 @@ #include #include -#include #ifdef LoadImage # undef LoadImage @@ -343,7 +341,6 @@ static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date ) /* Create new SPU region */ memset( &fmt, 0, sizeof(video_format_t) ); fmt.i_chroma = VLC_CODEC_YUVA; - fmt.i_aspect = VOUT_ASPECT_FACTOR; fmt.i_sar_num = fmt.i_sar_den = 1; fmt.i_width = fmt.i_visible_width = p_pic->p[Y_PLANE].i_visible_pitch; fmt.i_height = fmt.i_visible_height = p_pic->p[Y_PLANE].i_visible_lines; @@ -363,7 +360,7 @@ static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date ) /* where to locate the bar graph: */ if( p_sys->i_pos < 0 ) { /* set to an absolute xy */ - p_region->i_align = OSD_ALIGN_RIGHT | OSD_ALIGN_TOP; + p_region->i_align = SUBPICTURE_ALIGN_RIGHT | SUBPICTURE_ALIGN_TOP; p_spu->b_absolute = true; } else @@ -552,7 +549,7 @@ static picture_t *LoadImage( vlc_object_t *p_this, int nbChannels, int* i_values moinsDix = 0.32*scale + 20; moinsVingt = 0.1*scale + 20; - p_pic = picture_New(VLC_FOURCC('Y','U','V','A'), i_width+20, scale+30, VOUT_ASPECT_FACTOR * (i_width+20)/(scale+30)); + p_pic = picture_New(VLC_FOURCC('Y','U','V','A'), i_width+20, scale+30, 1, 1); // blacken the whole picture for( i = 0 ; i < p_pic->i_planes ; i++ ) @@ -940,7 +937,8 @@ void parse_i_values( BarGraph_t *p_BarGraph, char *i_values) res = strtok_r(i_values, delim, &tok); while (res != NULL) { p_BarGraph->nbChannels++; - p_BarGraph->i_values = (int*)realloc(p_BarGraph->i_values, p_BarGraph->nbChannels*sizeof(int)); + p_BarGraph->i_values = xrealloc(p_BarGraph->i_values, + p_BarGraph->nbChannels*sizeof(int)); p_BarGraph->i_values[p_BarGraph->nbChannels-1] = __MAX( __MIN( atof(res)*p_BarGraph->scale, p_BarGraph->scale ), 0 ); res = strtok_r(NULL, delim, &tok); }