]> git.sesse.net Git - vlc/commitdiff
* modules/codec/libmpeg2.c: tell mpeg2dec the real stride of our picture,
authorSam Hocevar <sam@videolan.org>
Mon, 13 Feb 2006 11:49:38 +0000 (11:49 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 13 Feb 2006 11:49:38 +0000 (11:49 +0000)
    because some Xv drivers do not necessarily pad video at 16 bytes.

modules/codec/libmpeg2.c

index 77230a116e508987a6e416f8a30721dbb3ecc1b9..35a96a317f0fc38313ae6b4bf936305b5e722c3c 100644 (file)
@@ -240,6 +240,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                     if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
                         break;
                     mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
+                    mpeg2_stride( p_sys->p_mpeg2dec, p_pic->format.i_width );
                 }
                 p_sys->p_picture_to_destroy = p_pic;
 
@@ -316,6 +317,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             }
 
             mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
+            mpeg2_stride( p_sys->p_mpeg2dec, p_pic->format.i_width );
 
             /* This picture will never go through display_picture. */
             p_pic->date = 0;
@@ -439,6 +441,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 }
 
                 mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
+                mpeg2_stride( p_sys->p_mpeg2dec, p_pic->format.i_width );
             }
         }
         break;
@@ -520,6 +523,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
                     break;
                 mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
+                mpeg2_stride( p_sys->p_mpeg2dec, p_pic->format.i_width );
             }
             p_sys->p_picture_to_destroy = p_pic;