[vlc-commits] packetizer: mpegvideo: fix visible/macroblocks size

Francois Cartegnie git at videolan.org
Tue Mar 21 13:34:05 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 21 13:33:13 2017 +0100| [b749316403acb00d9499e86ab20453e4b4ad2ebd] | committer: Francois Cartegnie

packetizer: mpegvideo: fix visible/macroblocks size

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b749316403acb00d9499e86ab20453e4b4ad2ebd
---

 modules/packetizer/mpegvideo.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c
index 2f51890..cc9df71 100644
--- a/modules/packetizer/mpegvideo.c
+++ b/modules/packetizer/mpegvideo.c
@@ -644,10 +644,12 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
         p_sys->i_seq_old = 0;
         p_sys->p_ext = NULL;
 
-        p_dec->fmt_out.video.i_width =
+        p_dec->fmt_out.video.i_visible_width =
             ( p_frag->p_buffer[4] << 4)|(p_frag->p_buffer[5] >> 4 );
-        p_dec->fmt_out.video.i_height =
+        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;
         p_sys->i_aspect_ratio_info = p_frag->p_buffer[7] >> 4;
 
         /* TODO: MPEG1 aspect ratio */
@@ -671,7 +673,8 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
 
         if ( !p_sys->b_inited )
         {
-            msg_Dbg( p_dec, "size %dx%d fps=%.3f",
+            msg_Dbg( p_dec, "size %dx%d/%dx%d fps=%.3f",
+                 p_dec->fmt_out.video.i_visible_width, p_dec->fmt_out.video.i_visible_height,
                  p_dec->fmt_out.video.i_width, p_dec->fmt_out.video.i_height,
                  p_sys->i_frame_rate / (float)p_sys->i_frame_rate_base );
             p_sys->b_inited = 1;



More information about the vlc-commits mailing list