2018-01-05 3:24 GMT+01:00 Rostislav Pehlivanov <atomnu...@gmail.com>: > On 4 January 2018 at 04:38, Carl Eugen Hoyos <ceffm...@gmail.com> wrote:
>> Attached patch fixes a warning here when compiling the opus encoder. > I don't like this patch and I'm planning on using that variable in the > future. New patch attached. Thank you, Carl Eugen
From 55ef093222ff162bfaffc95e1546f95e88532c0f Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Fri, 5 Jan 2018 05:09:49 +0100 Subject: [PATCH] lavc/opusenc_psy: Split variable declarations and code. Fixes a warning: libavcodec/opusenc_psy.c:407:5: warning: ISO C90 forbids mixed declarations and code --- libavcodec/opusenc_psy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/opusenc_psy.c b/libavcodec/opusenc_psy.c index b712603..2df2eb3 100644 --- a/libavcodec/opusenc_psy.c +++ b/libavcodec/opusenc_psy.c @@ -398,14 +398,12 @@ static void celt_search_for_dual_stereo(OpusPsyContext *s, CeltFrame *f) static void celt_search_for_intensity(OpusPsyContext *s, CeltFrame *f) { int i, best_band = CELT_MAX_BANDS - 1; - float dist, best_dist = FLT_MAX; + float dist, best_dist = FLT_MAX, end_band = 0; if (s->avctx->channels < 2) return; /* TODO: fix, make some heuristic up here using the lambda value */ - float end_band = 0; - for (i = f->end_band; i >= end_band; i--) { f->intensity_stereo = i; bands_dist(s, f, &dist); -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel