[vlc-commits] packetizer: mpegvideo: align height on 32 for field pictures
Francois Cartegnie
git at videolan.org
Tue Mar 21 13:43:30 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 21 13:42:02 2017 +0100| [b16b94839d3745aa9be8123635d1c7e2d50602b4] | committer: Francois Cartegnie
packetizer: mpegvideo: align height on 32 for field pictures
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b16b94839d3745aa9be8123635d1c7e2d50602b4
---
modules/packetizer/mpegvideo.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c
index cc9df71..b39c223 100644
--- a/modules/packetizer/mpegvideo.c
+++ b/modules/packetizer/mpegvideo.c
@@ -649,7 +649,10 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
p_dec->fmt_out.video.i_width = (p_dec->fmt_out.video.i_visible_width + 0x0F) & ~0x0F;
p_dec->fmt_out.video.i_visible_height =
( (p_frag->p_buffer[5]&0x0f) << 8 )|p_frag->p_buffer[6];
- p_dec->fmt_out.video.i_height = (p_dec->fmt_out.video.i_visible_height + 0x0F) & ~0x0F;
+ if( p_sys->b_seq_progressive )
+ p_dec->fmt_out.video.i_height = (p_dec->fmt_out.video.i_visible_height + 0x0F) & ~0x0F;
+ else
+ p_dec->fmt_out.video.i_height = (p_dec->fmt_out.video.i_visible_height + 0x1F) & ~0x1F;
p_sys->i_aspect_ratio_info = p_frag->p_buffer[7] >> 4;
/* TODO: MPEG1 aspect ratio */
More information about the vlc-commits
mailing list