Commit a757f6af authored by Gildas Bazin's avatar Gildas Bazin

* modules/demux/mp4/mp4.c, src/input/decoder.c: support for cropping in...

* modules/demux/mp4/mp4.c, src/input/decoder.c: support for cropping in quicktime files with H263 video.
parent 92811310
...@@ -1443,6 +1443,10 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track, ...@@ -1443,6 +1443,10 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
p_track->fmt.video.i_aspect = p_track->fmt.video.i_aspect =
VOUT_ASPECT_FACTOR * p_track->i_width / p_track->i_height; 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 */ /* Frame rate */
p_track->fmt.video.i_frame_rate = p_track->i_timescale; p_track->fmt.video.i_frame_rate = p_track->i_timescale;
p_track->fmt.video.i_frame_rate_base = 1; p_track->fmt.video.i_frame_rate_base = 1;
......
...@@ -950,12 +950,23 @@ static picture_t *vout_new_buffer( decoder_t *p_dec ) ...@@ -950,12 +950,23 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
if( !p_dec->fmt_out.video.i_visible_width || if( !p_dec->fmt_out.video.i_visible_width ||
!p_dec->fmt_out.video.i_visible_height ) !p_dec->fmt_out.video.i_visible_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_visible_width =
p_dec->fmt_out.video.i_width; p_dec->fmt_out.video.i_width;
p_dec->fmt_out.video.i_visible_height = p_dec->fmt_out.video.i_visible_height =
p_dec->fmt_out.video.i_height; p_dec->fmt_out.video.i_height;
} }
}
if( p_dec->fmt_out.video.i_visible_height == 1088 && if( p_dec->fmt_out.video.i_visible_height == 1088 &&
var_CreateGetBool( p_dec, "hdtv-fix" ) ) var_CreateGetBool( p_dec, "hdtv-fix" ) )
......
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