Commit 11662eb8 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: asf: only apply valid A/R

refs #11063
parent fd569c88
......@@ -657,17 +657,21 @@ static void ParsePayloadExtensions(demux_t *p_demux, asf_track_t *tk,
uint8_t i_ratio_x = *p_data;
uint8_t i_ratio_y = *(p_data + 1);
if ( tk->p_fmt->video.i_sar_num != i_ratio_x || tk->p_fmt->video.i_sar_den != i_ratio_y )
{
/* Only apply if origin pixel size >= 1x1, due to broken yacast */
if ( tk->p_fmt->video.i_height * i_ratio_x > tk->p_fmt->video.i_width * i_ratio_y )
{
vout_thread_t *p_vout = input_GetVout( p_demux->p_input );
if ( p_vout )
{
msg_Info( p_demux, "Changing aspect ratio to %i/%i", i_ratio_x, i_ratio_y );
tk->p_fmt->video.i_sar_num = i_ratio_x;
tk->p_fmt->video.i_sar_den = i_ratio_y;
vout_ChangeAspectRatio( p_vout, i_ratio_x, i_ratio_y );
vlc_object_release( p_vout );
}
}
tk->p_fmt->video.i_sar_num = i_ratio_x;
tk->p_fmt->video.i_sar_den = i_ratio_y;
}
}
i_length -= i_payload_extensions_size;
p_data += i_payload_extensions_size;
......
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