summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-01-11 17:26:08 +1100
committerMatthew Waters <matthew@centricular.com>2016-01-15 12:19:02 +1100
commitad2f0cf619ce464d3226a890eac818383fb0251a (patch)
treeb0318921051f1a193dcc19eea045e1ae83a53b51 /gst-libs/gst
parent0b9ae1f1d60d2ceb4feeede166ba2438f0a9af58 (diff)
downloadgstreamer-plugins-bad-ad2f0cf619ce464d3226a890eac818383fb0251a.tar.gz
gldebug: use gst_info_vasprintf in insert_debug_marker()
Allows expansion of GST_PTR_FORMAT and GST_SEGMENT_FORMAT arguments.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/gl/gstgldebug.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/gstgldebug.c b/gst-libs/gst/gl/gstgldebug.c
index a228e26ce..46833a7fa 100644
--- a/gst-libs/gst/gl/gstgldebug.c
+++ b/gst-libs/gst/gl/gstgldebug.c
@@ -204,9 +204,15 @@ gst_gl_insert_debug_marker (GstGLContext * context, const gchar * format, ...)
va_list args;
va_start (args, format);
- len = g_vasprintf (&string, format, args);
+ len = gst_info_vasprintf (&string, format, args);
va_end (args);
+ /* gst_info_vasprintf() returns -1 on error, the various debug marker
+ * functions take len=-1 to mean null terminated */
+ if (len < 0 || string == NULL)
+ /* no debug output */
+ return;
+
if (gl->DebugMessageInsert)
gl->DebugMessageInsert (GL_DEBUG_SOURCE_THIRD_PARTY, GL_DEBUG_TYPE_MARKER,
0, GL_DEBUG_SEVERITY_LOW, (gsize) len, string);