summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2015-03-01 13:56:17 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2015-03-01 14:03:05 -0500
commit501a53b26d33da9f6f1d61aa4f5c3a5fb40e5bd3 (patch)
tree5d3e0af8a6471e81c417b840771794ea6165a98f /ext
parent1521f65e8d1a645853a9f08e735f5a77b85c07c2 (diff)
downloadgstreamer-plugins-good-501a53b26d33da9f6f1d61aa4f5c3a5fb40e5bd3.tar.gz
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.
Diffstat (limited to 'ext')
-rw-r--r--ext/vpx/gstvp8dec.c3
-rw-r--r--ext/vpx/gstvp9dec.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c
index fb6e9289b..67a168aa0 100644
--- a/ext/vpx/gstvp8dec.c
+++ b/ext/vpx/gstvp8dec.c
@@ -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];
diff --git a/ext/vpx/gstvp9dec.c b/ext/vpx/gstvp9dec.c
index 880c19151..43c46b3f0 100644
--- a/ext/vpx/gstvp9dec.c
+++ b/ext/vpx/gstvp9dec.c
@@ -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];