summaryrefslogtreecommitdiff
path: root/ext/amrwbdec/amrwbdec.c
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-01-03 16:02:08 +0100
committerEdward Hervey <bilboed@bilboed.com>2018-01-03 16:02:08 +0100
commit6da70e278a5683d4e776edc25043f2c5d0a2a302 (patch)
treeafda83fbd1571fc1078f13d5dc4bf1964f4c548e /ext/amrwbdec/amrwbdec.c
parentc9baaf3e50d3e5870b86b41776b418630ed3db8f (diff)
downloadgstreamer-6da70e278a5683d4e776edc25043f2c5d0a2a302.tar.gz
amrwbdec: Don't use g_return_*_if_fail() on data parsing
Those functions can be disabled. Instead just use the (existing) function. CID #1427093
Diffstat (limited to 'ext/amrwbdec/amrwbdec.c')
-rw-r--r--ext/amrwbdec/amrwbdec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/amrwbdec/amrwbdec.c b/ext/amrwbdec/amrwbdec.c
index f90b7b7ee6..cf05d95300 100644
--- a/ext/amrwbdec/amrwbdec.c
+++ b/ext/amrwbdec/amrwbdec.c
@@ -172,14 +172,12 @@ gst_amrwbdec_parse (GstAudioDecoder * dec, GstAdapter * adapter,
gint block, mode;
size = gst_adapter_available (adapter);
- g_return_val_if_fail (size > 0, GST_FLOW_ERROR);
+ if (size < 1)
+ return GST_FLOW_ERROR;
gst_audio_decoder_get_parse_state (dec, &sync, &eos);
/* need to peek data to get the size */
- if (size < 1)
- return GST_FLOW_ERROR;
-
gst_adapter_copy (adapter, header, 0, 1);
mode = (header[0] >> 3) & 0x0F;
block = block_size[mode];