ext/libvisual/visual.c: Fix 'xyz may be used uninitialized' compiler warnings caused...
authorSebastian Dröge <slomo@circular-chaos.org>
Sat, 29 Dec 2007 16:23:23 +0000 (16:23 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Sat, 29 Dec 2007 16:23:23 +0000 (16:23 +0000)
Original commit message from CVS:
* ext/libvisual/visual.c: (gst_visual_chain):
Fix 'xyz may be used uninitialized' compiler warnings caused
by broken g_assert_not_reached() macro in GLib-2.15.x and don't
abort() in any case but properly report the error.

ChangeLog
ext/libvisual/visual.c

index 5f7ff44..b3922a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-29  Sebastian Dröge  <slomo@circular-chaos.org>
+
+       * ext/libvisual/visual.c: (gst_visual_chain):
+       Fix 'xyz may be used uninitialized' compiler warnings caused
+       by broken g_assert_not_reached() macro in GLib-2.15.x and don't
+       abort() in any case but properly report the error.
+
 2007-12-28  Wim Taymans  <wim.taymans@collabora.co.uk>
 
        * gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
index d027177..692769b 100644 (file)
@@ -673,7 +673,11 @@ gst_visual_chain (GstPad * pad, GstBuffer * buffer)
           rate = VISUAL_AUDIO_SAMPLE_RATE_96000;
           break;
         default:
-          g_assert_not_reached ();
+          visual_object_unref (VISUAL_OBJECT (lbuf));
+          visual_object_unref (VISUAL_OBJECT (rbuf));
+          GST_ERROR_OBJECT (visual, "unsupported rate %d", visual->rate);
+          ret = GST_FLOW_ERROR;
+          goto beach;
           break;
       }
 
@@ -738,10 +742,11 @@ gst_visual_chain (GstPad * pad, GstBuffer * buffer)
       break;
   }
 
+beach:
+
   if (outbuf != NULL)
     gst_buffer_unref (outbuf);
 
-beach:
   gst_object_unref (visual);
 
   return ret;