p_track->fmt.video.i_aspect =
VOUT_ASPECT_FACTOR * p_track->i_width / p_track->i_height;
+ /* Support for cropping (eg. in H263 files) */
+ p_track->fmt.video.i_visible_width = p_track->fmt.video.i_width;
+ p_track->fmt.video.i_visible_height = p_track->fmt.video.i_height;
+
/* Frame rate */
p_track->fmt.video.i_frame_rate = p_track->i_timescale;
p_track->fmt.video.i_frame_rate_base = 1;
if( !p_dec->fmt_out.video.i_visible_width ||
!p_dec->fmt_out.video.i_visible_height )
{
- p_dec->fmt_out.video.i_visible_width =
- p_dec->fmt_out.video.i_width;
- p_dec->fmt_out.video.i_visible_height =
- p_dec->fmt_out.video.i_height;
+ if( p_dec->fmt_in.video.i_visible_width &&
+ p_dec->fmt_in.video.i_visible_height )
+ {
+ p_dec->fmt_out.video.i_visible_width =
+ p_dec->fmt_in.video.i_visible_width;
+ p_dec->fmt_out.video.i_visible_height =
+ p_dec->fmt_in.video.i_visible_height;
+ }
+ else
+ {
+ p_dec->fmt_out.video.i_visible_width =
+ p_dec->fmt_out.video.i_width;
+ p_dec->fmt_out.video.i_visible_height =
+ p_dec->fmt_out.video.i_height;
+ }
}
if( p_dec->fmt_out.video.i_visible_height == 1088 &&