diff options
author | Tomas Härdin <tjoppen@acc.umu.se> | 2019-01-16 13:07:48 +0100 |
---|---|---|
committer | Tomas Härdin <tjoppen@acc.umu.se> | 2019-02-19 21:29:03 +0100 |
commit | abc5ac3cf5176189f43062f6a3e29fd012134613 (patch) | |
tree | 44a1e290a774daa64d8efdbd16dbfb1b735d9e6d /libavfilter | |
parent | f2e89fe4d34a7f53711ccea952331d2c77f04f19 (diff) | |
download | ffmpeg-abc5ac3cf5176189f43062f6a3e29fd012134613.tar.gz |
palettegen: Fill with last color, not black
If we fill with black then the generated palette will have one color more
than what the user requested. This also resulted in unwanted black specks in
the output of paletteuse, especially when generating small palettes.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_palettegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 5ff73e6b2b..44323782d2 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -245,7 +245,7 @@ static void write_palette(AVFilterContext *ctx, AVFrame *out) av_log(ctx, AV_LOG_WARNING, "Dupped color: %08"PRIX32"\n", pal[x]); last_color = pal[x]; } else { - pal[x] = 0xff000000; // pad with black + pal[x] = last_color; // pad with last color } } pal += pal_linesize; |