Commit cb347302 authored by Sam Hocevar's avatar Sam Hocevar

* modules/codec/libmpeg2.c: tell mpeg2dec the real stride of our picture,

    because some Xv drivers do not necessarily pad video at 16 bytes.
parent 8e5b3661
...@@ -240,6 +240,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -240,6 +240,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
break; break;
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic ); 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; p_sys->p_picture_to_destroy = p_pic;
...@@ -316,6 +317,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -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_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. */ /* This picture will never go through display_picture. */
p_pic->date = 0; p_pic->date = 0;
...@@ -439,6 +441,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -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_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
mpeg2_stride( p_sys->p_mpeg2dec, p_pic->format.i_width );
} }
} }
break; break;
...@@ -520,6 +523,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -520,6 +523,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
break; break;
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic ); 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; p_sys->p_picture_to_destroy = p_pic;
......
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