summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/dtls/gstdtlsconnection.c6
-rw-r--r--ext/dts/gstdtsdec.c17
-rw-r--r--ext/gl/gstglstereomix.c9
-rw-r--r--gst/audiomixer/gstaudioaggregator.c9
4 files changed, 35 insertions, 6 deletions
diff --git a/ext/dtls/gstdtlsconnection.c b/ext/dtls/gstdtlsconnection.c
index 3369a1462..36f6d635f 100644
--- a/ext/dtls/gstdtlsconnection.c
+++ b/ext/dtls/gstdtlsconnection.c
@@ -355,12 +355,18 @@ gst_dtls_connection_check_timeout_locked (GstDtlsConnection * self)
GST_DEBUG_OBJECT (self, "waiting for %" G_GINT64_FORMAT " usec", wait_time);
if (wait_time) {
GstClockID clock_id;
+#ifndef G_DISABLE_ASSERT
GstClockReturn clock_return;
+#endif
end_time = gst_clock_get_time (system_clock) + wait_time * GST_USECOND;
clock_id = gst_clock_new_single_shot_id (system_clock, end_time);
+#ifndef G_DISABLE_ASSERT
clock_return =
+#else
+ (void)
+#endif
gst_clock_id_wait_async (clock_id, schedule_timeout_handling,
g_object_ref (self), (GDestroyNotify) g_object_unref);
g_assert (clock_return == GST_CLOCK_OK);
diff --git a/ext/dts/gstdtsdec.c b/ext/dts/gstdtsdec.c
index 75199ccd5..c1f12c50b 100644
--- a/ext/dts/gstdtsdec.c
+++ b/ext/dts/gstdtsdec.c
@@ -458,10 +458,13 @@ gst_dtsdec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buffer)
gint channels, i, num_blocks;
gboolean need_renegotiation = FALSE;
guint8 *data;
- gsize size;
GstMapInfo map;
gint chans;
- gint length, flags, sample_rate, bit_rate, frame_length;
+#ifndef G_DISABLE_ASSERT
+ gsize size;
+ gint length;
+#endif
+ gint flags, sample_rate, bit_rate, frame_length;
GstFlowReturn result = GST_FLOW_OK;
GstBuffer *outbuf;
@@ -474,15 +477,24 @@ gst_dtsdec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buffer)
/* parsed stuff already, so this should work out fine */
gst_buffer_map (buffer, &map, GST_MAP_READ);
data = map.data;
+
+#ifndef G_DISABLE_ASSERT
size = map.size;
g_assert (size >= 7);
+#endif
bit_rate = dts->bit_rate;
sample_rate = dts->sample_rate;
flags = 0;
+
+#ifndef G_DISABLE_ASSERT
length = dca_syncinfo (dts->state, data, &flags, &sample_rate, &bit_rate,
&frame_length);
g_assert (length == size);
+#else
+ (void) dca_syncinfo (dts->state, data, &flags, &sample_rate, &bit_rate,
+ &frame_length);
+#endif
if (flags != dts->prev_flags) {
dts->prev_flags = flags;
@@ -597,7 +609,6 @@ gst_dtsdec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buffer)
gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
data = map.data;
- size = map.size;
{
guint8 *ptr = data;
for (i = 0; i < num_blocks; i++) {
diff --git a/ext/gl/gstglstereomix.c b/ext/gl/gstglstereomix.c
index 731569a67..b880d0635 100644
--- a/ext/gl/gstglstereomix.c
+++ b/ext/gl/gstglstereomix.c
@@ -503,7 +503,10 @@ gst_gl_stereo_mix_process_frames (GstGLStereoMix * mixer, GPtrArray * frames)
GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mixer);
GstBuffer *converted_buffer, *inbuf;
GstVideoInfo *out_info = &vagg->info;
- gint count = 0, n;
+ gint count = 0;
+#ifndef G_DISABLE_ASSERT
+ gint n;
+#endif
gint v, views;
gint valid_views = 0;
@@ -574,8 +577,12 @@ gst_gl_stereo_mix_process_frames (GstGLStereoMix * mixer, GPtrArray * frames)
return FALSE;
converted_buffer = mixer->primary_out;
+
+#ifndef G_DISABLE_ASSERT
n = gst_buffer_n_memory (converted_buffer);
g_assert (n == GST_VIDEO_INFO_N_PLANES (out_info) * views);
+#endif
+
for (v = 0; v < views; v++) {
gst_buffer_add_video_meta_full (converted_buffer, v,
GST_VIDEO_INFO_FORMAT (out_info),
diff --git a/gst/audiomixer/gstaudioaggregator.c b/gst/audiomixer/gstaudioaggregator.c
index c30bc6486..1d3dcb56b 100644
--- a/gst/audiomixer/gstaudioaggregator.c
+++ b/gst/audiomixer/gstaudioaggregator.c
@@ -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
}