matroska: Avoid debugging below category threshold
authorEdward Hervey <bilboed@bilboed.com>
Sat, 20 Dec 2014 16:09:14 +0000 (17:09 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Wed, 21 Jan 2015 14:26:41 +0000 (15:26 +0100)
This part alone was what made the matroska thread take a full core
on an android phone ...

gst/matroska/ebml-read.c

index 97665ca..a8be67a 100644 (file)
@@ -221,7 +221,7 @@ gst_ebml_peek_id_full (GstEbmlRead * ebml, guint32 * id, guint64 * length,
       gst_ebml_read_get_pos (ebml), *length, *prefix);
 
 #ifndef GST_DISABLE_GST_DEBUG
-  {
+  if (ebmlread_debug->threshold >= GST_LEVEL_LOG) {
     const guint8 *data = NULL;
     GstByteReader *br = gst_ebml_read_br (ebml);
     guint size = gst_byte_reader_get_remaining (br);