From: Matthew Waters Date: Mon, 11 Jan 2016 06:26:08 +0000 (+1100) Subject: gldebug: use gst_info_vasprintf in insert_debug_marker() X-Git-Tag: 1.19.3~511^2~1989^2~475 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b804aa2399566438bfd18ce504d94d562279a2de;p=platform%2Fupstream%2Fgstreamer.git gldebug: use gst_info_vasprintf in insert_debug_marker() Allows expansion of GST_PTR_FORMAT and GST_SEGMENT_FORMAT arguments. --- diff --git a/gst-libs/gst/gl/gstgldebug.c b/gst-libs/gst/gl/gstgldebug.c index a228e26..46833a7 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);