From: Edward Hervey Date: Wed, 3 Jan 2018 15:02:08 +0000 (+0100) Subject: amrnbdec: Don't use g_return_*_if_fail() on data parsing X-Git-Tag: 1.16.2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63f8d33a6fd6ab6c50069355b6619289b9869e53;p=platform%2Fupstream%2Fgst-plugins-ugly.git amrnbdec: Don't use g_return_*_if_fail() on data parsing Those functions can be disabled. Instead just use the (existing) function. CID #1427121 --- 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 */