From 1bf936db6d0bf06a73361cb2965486149c7c8f71 Mon Sep 17 00:00:00 2001 From: Erik Walthinsen Date: Mon, 1 Jan 2001 04:41:40 +0000 Subject: [PATCH] modified cmdlien code to take both 0xHEX and dec, and added an INFO line in gst_pad_connect() Original commit message from CVS: modified cmdlien code to take both 0xHEX and dec, and added an INFO line in gst_pad_connect() --- gst/gst.c | 16 +++++++++++++--- gst/gstpad.c | 3 +++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gst/gst.c b/gst/gst.c index db40c659d1..cb1b17ae64 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -99,7 +99,12 @@ gst_init_check (int *argc, if (!strncmp ("--gst-info-mask=", (*argv)[i], 16)) { guint32 val; - sscanf ((*argv)[i]+16, "%08x", &val); + // handle either 0xHEX or dec + if (*((*argv)[i]+17) == 'x') { + sscanf ((*argv)[i]+18, "%08x", &val); + } else { + sscanf ((*argv)[i]+16, "%d", &val); + } gst_info_set_categories (val); @@ -108,7 +113,12 @@ gst_init_check (int *argc, else if (!strncmp ("--gst-info-mask=", (*argv)[i], 16)) { guint32 val; - sscanf ((*argv)[i]+16, "%08x", &val); + // handle either 0xHEX or dec + if (*((*argv)[i]+17) == 'x') { + sscanf ((*argv)[i]+18, "%08x", &val); + } else { + sscanf ((*argv)[i]+16, "%d", &val); + } //FIXME //gst_info_set_categories (val); @@ -146,7 +156,7 @@ gst_init_check (int *argc, g_print ("\nGStreamer info/debug FLAGS (to be OR'ed)\n"); for (i = 0; i