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:43 +0200
commitd7f845f05bb2ed59f7434d11b70e2a694f246b59 (patch)
treed28ebabce57ee9409097d837fae94b404135def7
parent6f2c1259b3ed66944ffeb48096a9c04677682480 (diff)
amrnbdec: Don't use g_return_*_if_fail() on data parsing
Those functions can be disabled. Instead just use the (existing) function. CID #1427121
-rw-r--r--ext/amrnb/amrnbdec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/amrnb/amrnbdec.c b/ext/amrnb/amrnbdec.c
index 653f1c59..8f2c4229 100644
--- a/ext/amrnb/amrnbdec.c
+++ b/ext/amrnb/amrnbdec.c
@@ -241,14 +241,12 @@ gst_amrnbdec_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, head, 0, 1);
/* get size */