[FFmpeg-devel] [PATCH] lavc/dvdsubenc: accept palette from options

Michael Kuron michael.kuron at gmail.com
Sat Jan 25 13:13:10 EET 2020


On Sat, Jan 25, 2020 at 01:24 AM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>> static const AVOption options[] = {
>> +    {"palette", "set the global palette", OFFSET(palette_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SE },
>
> What happens if invalid values are passed as palette?

The string is parsed until it hits something invalid (i.e. anything
except for space, comma, or hex number) and all remaining palette
colors are set to black. The same happens if you pass fewer than 16
values. This is what dvdsubdec does too. In fact, this entire patch is
basically copy+paste from there.


More information about the ffmpeg-devel mailing list