mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
gst: Don't pass miniobjects to GST_DEBUG_OBJECT() and similar macros
The argument must be at least a GObject according to the GstLogFunction definition, and while the default C log function handles miniobjects just fine this is crashing bindings and user-supplied log functions that (rightfully) don't expect anything but GObjects.
This commit is contained in:
parent
3ffd1e4f1d
commit
0c6f5b3e4c
2 changed files with 4 additions and 5 deletions
|
@ -1834,7 +1834,7 @@ gst_buffer_map_range (GstBuffer * buffer, guint idx, gint length,
|
||||||
/* ERROR */
|
/* ERROR */
|
||||||
not_writable:
|
not_writable:
|
||||||
{
|
{
|
||||||
GST_WARNING_OBJECT (buffer, "write map requested on non-writable buffer");
|
GST_WARNING ("write map requested on non-writable buffer");
|
||||||
g_critical ("write map requested on non-writable buffer");
|
g_critical ("write map requested on non-writable buffer");
|
||||||
memset (info, 0, sizeof (GstMapInfo));
|
memset (info, 0, sizeof (GstMapInfo));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1842,13 +1842,13 @@ not_writable:
|
||||||
no_memory:
|
no_memory:
|
||||||
{
|
{
|
||||||
/* empty buffer, we need to return NULL */
|
/* empty buffer, we need to return NULL */
|
||||||
GST_DEBUG_OBJECT (buffer, "can't get buffer memory");
|
GST_DEBUG ("can't get buffer memory");
|
||||||
memset (info, 0, sizeof (GstMapInfo));
|
memset (info, 0, sizeof (GstMapInfo));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
cannot_map:
|
cannot_map:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (buffer, "cannot map memory");
|
GST_DEBUG ("cannot map memory");
|
||||||
memset (info, 0, sizeof (GstMapInfo));
|
memset (info, 0, sizeof (GstMapInfo));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,8 +175,7 @@ _gst_caps_copy (const GstCaps * caps)
|
||||||
GST_CAPS_FLAGS (newcaps) = GST_CAPS_FLAGS (caps);
|
GST_CAPS_FLAGS (newcaps) = GST_CAPS_FLAGS (caps);
|
||||||
n = GST_CAPS_LEN (caps);
|
n = GST_CAPS_LEN (caps);
|
||||||
|
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, caps, "doing copy %p -> %p",
|
GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "doing copy %p -> %p", caps, newcaps);
|
||||||
caps, newcaps);
|
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
structure = gst_caps_get_structure_unchecked (caps, i);
|
structure = gst_caps_get_structure_unchecked (caps, i);
|
||||||
|
|
Loading…
Reference in a new issue