avfilter/avf_showcwt: Check av_parse_video_rate() for failure

Fixes: CID1539147 Unused value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-06-11 22:44:46 +02:00
parent 0d0373de3b
commit aab0c344c5
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 0 deletions

View File

@ -1028,6 +1028,8 @@ static int config_output(AVFilterLink *outlink)
s->auto_frame_rate = av_make_q(inlink->sample_rate, s->hop_size);
if (strcmp(s->rate_str, "auto")) {
ret = av_parse_video_rate(&s->frame_rate, s->rate_str);
if (ret < 0)
return ret;
} else {
s->frame_rate = s->auto_frame_rate;
}