Hi!

Attached patch fixes a warning here when compiling the opus encoder.

Please comment, Carl Eugen
From 605194d85651b76586c8f14cf8034a266e9fc8fd Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@gmail.com>
Date: Thu, 4 Jan 2018 05:36:38 +0100
Subject: [PATCH] lavc/opusenc_psy: Remove a write-only variable.

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..622f15c 100644
--- a/libavcodec/opusenc_psy.c
+++ b/libavcodec/opusenc_psy.c
@@ -404,9 +404,7 @@ static void celt_search_for_intensity(OpusPsyContext *s, CeltFrame *f)
         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--) {
+    for (i = f->end_band; i >= 0; i--) {
         f->intensity_stereo = i;
         bands_dist(s, f, &dist);
         if (best_dist > dist) {
-- 
1.7.10.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to