From 14ceb5727c90e8e4a85cb08bd736eba58a7b7bc8 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 30 Apr 2014 18:06:40 +0100 Subject: [PATCH] flacdec: remove dead code For 8 bit width, we always have depth==gdepth==width==8. Coverity 1139678 --- ext/flac/gstflacdec.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 10f4527..08a93bd 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -670,18 +670,10 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame, gint8 *outbuffer = (gint8 *) map.data; gint *reorder_map = flacdec->channel_reorder_map; - if (gdepth != depth) { - for (i = 0; i < samples; i++) { - for (j = 0; j < channels; j++) { - *outbuffer++ = - (gint8) (buffer[reorder_map[j]][i] << (gdepth - depth)); - } - } - } else { - for (i = 0; i < samples; i++) { - for (j = 0; j < channels; j++) { - *outbuffer++ = (gint8) buffer[reorder_map[j]][i]; - } + g_assert (gdepth == 8 && depth == 8); + for (i = 0; i < samples; i++) { + for (j = 0; j < channels; j++) { + *outbuffer++ = (gint8) buffer[reorder_map[j]][i]; } } } else if (width == 16) { -- 2.7.4