mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
lavfi: remove redundant checks after av_parse_video_rate()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
4da42ebe44
commit
de05877390
@ -400,8 +400,7 @@ static av_cold int source_init(AVFilterContext *ctx, const char *args, void *opa
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (av_parse_video_rate(&frame_rate_q, frame_rate) < 0 ||
|
||||
frame_rate_q.den <= 0 || frame_rate_q.num <= 0) {
|
||||
if (av_parse_video_rate(&frame_rate_q, frame_rate) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'\n", frame_rate);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
@ -90,8 +90,7 @@ static av_cold int color_init(AVFilterContext *ctx, const char *args, void *opaq
|
||||
av_log(ctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args);
|
||||
goto end;
|
||||
}
|
||||
if (av_parse_video_rate(&frame_rate_q, color->rate_str) < 0 ||
|
||||
frame_rate_q.den <= 0 || frame_rate_q.num <= 0) {
|
||||
if (av_parse_video_rate(&frame_rate_q, color->rate_str) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: %s\n", color->rate_str);
|
||||
ret = AVERROR(EINVAL);
|
||||
goto end;
|
||||
@ -107,8 +106,7 @@ static av_cold int color_init(AVFilterContext *ctx, const char *args, void *opaq
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid frame size: %s\n", frame_size);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
if (av_parse_video_rate(&frame_rate_q, frame_rate) < 0 ||
|
||||
frame_rate_q.den <= 0 || frame_rate_q.num <= 0) {
|
||||
if (av_parse_video_rate(&frame_rate_q, frame_rate) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: %s\n", frame_rate);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
@ -131,8 +131,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
||||
mb->start_scale /=mb->h;
|
||||
mb->end_scale /=mb->h;
|
||||
|
||||
if (av_parse_video_rate(&rate_q, mb->rate) < 0 ||
|
||||
rate_q.den <= 0 || rate_q.num <= 0) {
|
||||
if (av_parse_video_rate(&rate_q, mb->rate) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: %s\n", mb->rate);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
@ -276,8 +276,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = av_parse_video_rate(&frame_rate_q, test->rate)) < 0 ||
|
||||
frame_rate_q.den <= 0 || frame_rate_q.num <= 0) {
|
||||
if ((ret = av_parse_video_rate(&frame_rate_q, test->rate)) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'\n", test->rate);
|
||||
return ret;
|
||||
}
|
||||
|
@ -86,8 +86,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = av_parse_video_rate(&frame_rate_q, test->rate)) < 0 ||
|
||||
frame_rate_q.den <= 0 || frame_rate_q.num <= 0) {
|
||||
if ((ret = av_parse_video_rate(&frame_rate_q, test->rate)) < 0) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'\n", test->rate);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user