Don't throw compiler warnings with G_DISABLE_ASSERT

Disable code that warns about unused variables when G_DISABLE_ASSERT
is defined, as it is in tarballs and pre-releases.
This commit is contained in:
Jan Schmidt 2015-09-18 00:20:13 +10:00
parent 41fae5fa5d
commit e88ecc367b

View file

@ -625,13 +625,18 @@ void
gst_audio_aggregator_set_sink_caps (GstAudioAggregator * aagg,
GstAudioAggregatorPad * pad, GstCaps * caps)
{
#ifndef G_DISABLE_ASSERT
gboolean valid;
GST_OBJECT_LOCK (pad);
valid = gst_audio_info_from_caps (&pad->info, caps);
GST_OBJECT_UNLOCK (pad);
g_assert (valid);
#else
GST_OBJECT_LOCK (pad);
(void) gst_audio_info_from_caps (&pad->info, caps);
GST_OBJECT_UNLOCK (pad);
#endif
}