[Bug 767712] xvimage: Missing sanity checking for allocation sizes for various video formats

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jun 30 06:30:06 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=767712

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #330629|none                        |needs-work
             status|                            |

--- Comment #27 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 330629:
 --> (https://bugzilla.gnome.org/review?bug=767712&attachment=330629)

I think it would be a good idea to just store the GstVideoInfo (not just the
GstVideoFormatInfo) in the xv allocator, it will be useful to have sooner or
later and makes this NULL go away :)

Should probably also get some more sanity checks for other supported YUV
formats (these are not all, right?), but that can be done when needed or later.

::: sys/xvimage/xvimageallocator.c
@@ +405,3 @@
+      switch (im_format) {
+        case GST_MAKE_FOURCC ('I', '4', '2', '0'):
+        case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):

We could also consistently go via the GstVideoFormat stored in it, instead of
having two different code paths

@@ +438,3 @@
+    } else if (GST_VIDEO_FORMAT_INFO_IS_RGB (info)) {
+      expected_size = padded_height * padded_width *
+          GST_VIDEO_FORMAT_INFO_PSTRIDE (info, 0);

My guess is that this should be "padded_height * GST_ROUND_UP_4(padded_width *
pstride)"

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list