From 74c93b8fc77b84aae7bea58c86e60e2e4c565d1d Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 2 May 2014 09:43:54 +0100 Subject: [PATCH] speexdec: remove dead code fpp can never equal 0 here, or the loop would not execute at all. Zero fpp was possible before as the loop condition was allowing it specifically, but no more. Coverity 1139681 --- ext/speex/gstspeexdec.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index 8196939f4c..9b62ebe72a 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -419,13 +419,7 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) if (ret == -1) { /* uh? end of stream */ - if (fpp == 0 && speex_bits_remaining (bits) < 8) { - /* if we did not know how many frames to expect, then we get this - at the end if there are leftover bits to pad to the next byte */ - GST_DEBUG_OBJECT (dec, "Discarding leftover bits"); - } else { - GST_WARNING_OBJECT (dec, "Unexpected end of stream found"); - } + GST_WARNING_OBJECT (dec, "Unexpected end of stream found"); corrupted = TRUE; } else if (ret == -2) { GST_WARNING_OBJECT (dec, "Decoding error: corrupted stream?");