diff options
author | jstebbins <[email protected]> | 2011-03-13 17:14:36 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-03-13 17:14:36 +0000 |
commit | 1e6f3e13c431598ea8338fa19dd0f2504e2b3ef5 (patch) | |
tree | 77b88c1129e8c5f6a98f7e39ae8e497bb860a883 | |
parent | b6a5d4eba610711d15ed99dc5f2e9e126ce06086 (diff) |
Fix source dimensions problem with some mpeg2 streams
Was using the incorrect field for actual "display" dimensions of video.
The field I was using is most often used for pan and scan which
crops a 16:9 image to fit a 4:3 display.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3847 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/decmpeg2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libhb/decmpeg2.c b/libhb/decmpeg2.c index 6f7c8e7e1..19d1d4213 100644 --- a/libhb/decmpeg2.c +++ b/libhb/decmpeg2.c @@ -360,8 +360,8 @@ static int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, { if( !( m->width && m->height && m->rate ) ) { - m->width = m->info->sequence->display_width; - m->height = m->info->sequence->display_height; + m->width = m->info->sequence->picture_width; + m->height = m->info->sequence->picture_height; m->rate = m->info->sequence->frame_period; if ( m->aspect_ratio <= 0 && m->height && m->info->sequence->pixel_height ) @@ -408,13 +408,13 @@ static int hb_libmpeg2_decode( hb_libmpeg2_t * m, hb_buffer_t * buf_es, if( m->got_iframe ) { int crop[4] = {0}; - if ( m->info->sequence->display_width < m->info->sequence->width ) + if ( m->info->sequence->picture_width < m->info->sequence->width ) { - crop[3] = m->info->sequence->width - m->info->sequence->display_width; + crop[3] = m->info->sequence->width - m->info->sequence->picture_width; } - if ( m->info->sequence->display_height < m->info->sequence->height ) + if ( m->info->sequence->picture_height < m->info->sequence->height ) { - crop[1] = m->info->sequence->height - m->info->sequence->display_height; + crop[1] = m->info->sequence->height - m->info->sequence->picture_height; } buf = hb_copy_frame( m->job, m->info->sequence->width, |