mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
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
2 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue