Commit a757f6af authored by gbazin's avatar gbazin
Browse files

* 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;
......
...@@ -951,10 +951,21 @@ static picture_t *vout_new_buffer( decoder_t *p_dec ) ...@@ -951,10 +951,21 @@ 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 )
{ {
p_dec->fmt_out.video.i_visible_width = if( p_dec->fmt_in.video.i_visible_width &&
p_dec->fmt_out.video.i_width; p_dec->fmt_in.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_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 && if( p_dec->fmt_out.video.i_visible_height == 1088 &&
......
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