vpxdec: Fix calculation of width in bytes
Right now we only support I420, but vpx seems to support more formats. This will prevent hard to find bug in the future.
This commit is contained in:
parent
1521f65e8d
commit
501a53b26d
@ -384,7 +384,8 @@ gst_vp8_dec_image_to_buffer (GstVP8Dec * dec, const vpx_image_t * img,
|
||||
for (comp = 0; comp < 3; comp++) {
|
||||
dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp);
|
||||
src = img->planes[comp];
|
||||
width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp);
|
||||
width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp)
|
||||
* GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp);
|
||||
height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp);
|
||||
deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp);
|
||||
srcstride = img->stride[comp];
|
||||
|
@ -381,7 +381,8 @@ gst_vp9_dec_image_to_buffer (GstVP9Dec * dec, const vpx_image_t * img,
|
||||
for (comp = 0; comp < 3; comp++) {
|
||||
dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp);
|
||||
src = img->planes[comp];
|
||||
width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp);
|
||||
width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp)
|
||||
* GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp);
|
||||
height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp);
|
||||
deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp);
|
||||
srcstride = img->stride[comp];
|
||||
|
Loading…
x
Reference in New Issue
Block a user