aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-02-25 17:25:10 +0100
committerClément Bœsch <clement@stupeflix.com>2015-02-25 17:25:27 +0100
commit5c11f5b4a227ae2334309319c18adc06f79c4acb (patch)
tree819189acf66b511e16884408d4164a00e0b818f3
parentbbbc8c618884a838c00faaaa91898017dd431117 (diff)
downloadffmpeg-5c11f5b4a227ae2334309319c18adc06f79c4acb.tar.gz
avfilter/palettegen: move longest variable to a local scope
Also drop initialization since it is initialized later on before any usage.
-rw-r--r--libavfilter/vf_palettegen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c
index 0e303a9f40..a7d1ffbc3b 100644
--- a/libavfilter/vf_palettegen.c
+++ b/libavfilter/vf_palettegen.c
@@ -285,7 +285,6 @@ static AVFrame *get_palette_frame(AVFilterContext *ctx)
PaletteGenContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
int box_id = 0;
- int longest = 0;
struct range_box *box;
/* reference only the used colors from histogram */
@@ -310,7 +309,7 @@ static AVFrame *get_palette_frame(AVFilterContext *ctx)
s->nb_boxes = 1;
while (box && box->len > 1) {
- int i, rr, gr, br;
+ int i, rr, gr, br, longest;
uint64_t median, box_weight = 0;
/* compute the box weight (sum all the weights of the colors in the