diff options
author | Clément Bœsch <u@pkh.me> | 2014-09-11 21:09:39 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2014-09-16 21:23:33 +0200 |
commit | a87527ad67377d502fc0731021239797cb8e9481 (patch) | |
tree | 45d25ac562f9ead8f62ee199d4e2f75214ff7c6f /libavfilter | |
parent | 7d43fbe3aef8594fbc4a07c3990f865bb3e04628 (diff) | |
download | ffmpeg-a87527ad67377d502fc0731021239797cb8e9481.tar.gz |
avfilter/ass: make sure the log level are in available range
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_subtitles.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 4fa11744c4..44273cbdb8 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -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"); |