mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/ass: make sure the log level are in available range
This commit is contained in:
parent
7d43fbe3ae
commit
a87527ad67
@ -80,7 +80,9 @@ static const int ass_libavfilter_log_level_map[] = {
|
||||
|
||||
static void ass_log(int ass_level, const char *fmt, va_list args, void *ctx)
|
||||
{
|
||||
int level = ass_libavfilter_log_level_map[ass_level];
|
||||
const int ass_level_clip = av_clip(ass_level, 0,
|
||||
FF_ARRAY_ELEMS(ass_libavfilter_log_level_map) - 1);
|
||||
const int level = ass_libavfilter_log_level_map[ass_level_clip];
|
||||
|
||||
av_vlog(ctx, level, fmt, args);
|
||||
av_log(ctx, level, "\n");
|
||||
|
Loading…
Reference in New Issue
Block a user