matroska, videobox, videofilter: fix compiler warnings when debugging is disabled...
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 24 Jun 2010 15:32:23 +0000 (16:32 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 24 Jun 2010 15:34:03 +0000 (16:34 +0100)
Fixes unused variable warnings when GStreamer's debugging system has been disabled.

gst/matroska/ebml-read.c
gst/videobox/gstvideobox.c
gst/videofilter/gstvideoflip.c

index ae58ce6..379c882 100644 (file)
@@ -207,7 +207,6 @@ gst_ebml_peek_id_full (GstEbmlRead * ebml, guint32 * id, guint64 * length,
     guint * prefix)
 {
   GstFlowReturn ret;
-  const guint8 *data = NULL;
 
   ret = gst_ebml_peek_id_length (id, length, prefix,
       (GstPeekData) gst_ebml_read_peek, (gpointer) gst_ebml_read_br (ebml),
@@ -221,8 +220,10 @@ gst_ebml_peek_id_full (GstEbmlRead * ebml, guint32 * id, guint64 * length,
 
 #ifndef GST_DISABLE_GST_DEBUG
   {
+    const guint8 *data = NULL;
     GstByteReader *br = gst_ebml_read_br (ebml);
     guint size = gst_byte_reader_get_remaining (br);
+
     gst_byte_reader_peek_data (br, size, &data);
 
     GST_LOG_OBJECT (ebml->el, "current br %p; remaining %d", br, size);
index 6b4be86..f985488 100644 (file)
@@ -3186,7 +3186,6 @@ static gboolean
 gst_video_box_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
     guint * size)
 {
-  GstVideoBox *video_box = GST_VIDEO_BOX (trans);
   GstVideoFormat format;
   gint width, height;
   gboolean ret;
@@ -3195,13 +3194,13 @@ gst_video_box_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
 
   ret = gst_video_format_parse_caps (caps, &format, &width, &height);
   if (!ret) {
-    GST_ERROR_OBJECT (video_box, "Invalid caps: %" GST_PTR_FORMAT, caps);
+    GST_ERROR_OBJECT (trans, "Invalid caps: %" GST_PTR_FORMAT, caps);
     return FALSE;
   }
 
   *size = gst_video_format_get_size (format, width, height);
 
-  GST_LOG_OBJECT (video_box, "Returning from _unit_size %d", *size);
+  GST_LOG_OBJECT (trans, "Returning from _unit_size %d", *size);
 
   return TRUE;
 }
index 410d62f..7b3e2a9 100644 (file)
@@ -187,7 +187,6 @@ static gboolean
 gst_video_flip_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
     guint * size)
 {
-  GstVideoFlip *videoflip = GST_VIDEO_FLIP (btrans);
   GstVideoFormat format;
   gint width, height;
 
@@ -196,7 +195,7 @@ gst_video_flip_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
 
   *size = gst_video_format_get_size (format, width, height);
 
-  GST_DEBUG_OBJECT (videoflip, "our frame size is %d bytes (%dx%d)", *size,
+  GST_DEBUG_OBJECT (btrans, "our frame size is %d bytes (%dx%d)", *size,
       width, height);
 
   return TRUE;