ext/libvisual/visual.c: Fix 'xyz may be used uninitialized' compiler warnings caused by broken g_assert_not_reached()...

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.
This commit is contained in:
Sebastian Dröge 2007-12-29 16:23:23 +00:00
parent 7cb7bffb9e
commit d712e44d30
2 changed files with 14 additions and 2 deletions

View file

@ -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),

View 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;