mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
tools: fix compiler warning
gst-launch.c: In function ‘print_toc_entry’: gst-launch.c:446:3: error: the size of array ‘spc’ can’t be evaluated [-Werror=vla] gst-launch.c:446:3: error: variable-sized object may not be initialized
This commit is contained in:
parent
942f455170
commit
f1bf53823a
1 changed files with 5 additions and 4 deletions
|
@ -438,19 +438,20 @@ print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
|
|||
}
|
||||
}
|
||||
|
||||
#define MAX_INDENT 40
|
||||
|
||||
static void
|
||||
print_toc_entry (gpointer data, gpointer user_data)
|
||||
{
|
||||
GstTocEntry *entry = (GstTocEntry *) data;
|
||||
const guint max_indent = 40;
|
||||
const gchar spc[max_indent + 1] = " ";
|
||||
const gchar spc[MAX_INDENT + 1] = " ";
|
||||
const gchar *entry_types[] = { "chapter", "edition" };
|
||||
guint indent = MIN (GPOINTER_TO_UINT (user_data), max_indent);
|
||||
guint indent = MIN (GPOINTER_TO_UINT (user_data), MAX_INDENT);
|
||||
gint64 start, stop;
|
||||
|
||||
gst_toc_entry_get_start_stop (entry, &start, &stop);
|
||||
|
||||
PRINT ("%s%s:", &spc[max_indent - indent], entry_types[entry->type]);
|
||||
PRINT ("%s%s:", &spc[MAX_INDENT - indent], entry_types[entry->type]);
|
||||
if (GST_CLOCK_TIME_IS_VALID (start)) {
|
||||
PRINT (" start: %" GST_TIME_FORMAT, GST_TIME_ARGS (start));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue