summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-01-03 16:02:08 +0100
committerSebastian Dröge <sebastian@centricular.com>2018-01-17 16:15:38 +0200
commit6f2c1259b3ed66944ffeb48096a9c04677682480 (patch)
tree5e89c55c86d5a00f19bd5777e92492f4ab9b00f9
parent46fab99f2ef5581d63c2d11c57fb741553ede37f (diff)
amrwbdec: Don't use g_return_*_if_fail() on data parsing
Those functions can be disabled. Instead just use the (existing) function. CID #1427093
-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 f90b7b7e..cf05d953 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];