GST_DEBUG_CATEGORY (mpegvideo_parser_debug);
#define GST_CAT_DEFAULT mpegvideo_parser_debug
-static gboolean initialized = FALSE;
+#define INITIALIZE_DEBUG_CATEGORY \
+ GST_DEBUG_CATEGORY_INIT (mpegvideo_parser_debug, "codecparsers_mpegvideo", \
+ 0, "Mpegvideo parser library");
+
/* Set the Pixel Aspect Ratio in our hdr from a ASR code in the data */
static void
gint off;
GstByteReader br;
- if (!initialized) {
- GST_DEBUG_CATEGORY_INIT (mpegvideo_parser_debug, "codecparsers_mpegvideo",
- 0, "Mpegvideo parser library");
- initialized = TRUE;
- }
+ INITIALIZE_DEBUG_CATEGORY;
if (size <= offset) {
GST_DEBUG ("Can't parse from offset %d, buffer is to small", offset);
if (packet->size < 8)
return FALSE;
+ INITIALIZE_DEBUG_CATEGORY;
+
gst_bit_reader_init (&br, &packet->data[packet->offset], packet->size);
/* Setting the height/width codes */