Commit 472d88ba authored by Damien Fouilleul's avatar Damien Fouilleul

- libmpeg2 codec: uses Y plane pitch rather then picture width as stride, hopefully closes #1184

parent bd9935bf
......@@ -242,7 +242,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 );
mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
}
p_sys->p_picture_to_destroy = p_pic;
......@@ -322,7 +322,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 );
mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
/* This picture will never go through display_picture. */
p_pic->date = 0;
......@@ -440,7 +440,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 );
mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
}
}
break;
......@@ -522,7 +522,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 );
mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
}
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