Commit 83ec5ce2 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/video_output.c, src/input/decoder.c,...

* src/video_output/video_output.c, src/input/decoder.c, include/video_output.h: try to reduce i_sar_num/i_sar_den a bit hader to prevent overflows + remove p_vout->b_override_aspect which isn't used anymore.
parent b376e4e2
......@@ -84,7 +84,6 @@ struct vout_thread_t
vlc_bool_t b_interface; /**< render interface */
vlc_bool_t b_scale; /**< allow picture scaling */
vlc_bool_t b_fullscreen; /**< toogle fullscreen display */
vlc_bool_t b_override_aspect; /**< aspect ratio overriden */
uint32_t render_time; /**< last picture render time */
unsigned int i_window_width; /**< video window width */
unsigned int i_window_height; /**< video window height */
......
......@@ -946,7 +946,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
vlc_ureduce( &p_dec->fmt_out.video.i_sar_num,
&p_dec->fmt_out.video.i_sar_den,
p_dec->fmt_out.video.i_sar_num,
p_dec->fmt_out.video.i_sar_den, 0 );
p_dec->fmt_out.video.i_sar_den, 50000 );
p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;
p_sys->video = p_dec->fmt_out.video;
......
......@@ -173,8 +173,7 @@ 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_override_aspect ) ||
( p_vout->fmt_render.i_aspect != p_fmt->i_aspect ) ||
p_vout->b_filter_change )
{
/* We are not interested in this format, close this vout */
......@@ -246,12 +245,11 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
/* Initialize the rendering heap */
I_RENDERPICTURES = 0;
vlc_ureduce( &p_fmt->i_sar_num, &p_fmt->i_sar_den,
p_fmt->i_sar_num, p_fmt->i_sar_den, 50000 );
p_vout->fmt_render = *p_fmt; /* FIXME palette */
p_vout->fmt_in = *p_fmt; /* FIXME palette */
vlc_ureduce( &p_vout->fmt_render.i_sar_num, &p_vout->fmt_render.i_sar_den,
p_vout->fmt_render.i_sar_num, p_vout->fmt_render.i_sar_den, 0 );
vlc_ureduce( &p_vout->fmt_in.i_sar_num, &p_vout->fmt_in.i_sar_den,
p_vout->fmt_in.i_sar_num, p_vout->fmt_in.i_sar_den, 0 );
p_vout->render.i_width = i_width;
p_vout->render.i_height = i_height;
......@@ -315,8 +313,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
/* Take care of some "interface/control" related initialisations */
vout_IntfInit( p_vout );
p_vout->b_override_aspect = VLC_FALSE;
/* If the parent is not a VOUT object, that means we are at the start of
* the video output pipe */
if( p_parent->i_object_type != VLC_OBJECT_VOUT )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment