Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-06-20 21:17:25 +0400
committerPaul B Mahol <onemda@gmail.com>2012-06-21 00:36:12 +0400
commitde0587739011b7636743251a86d48bcd10ab7c22 (patch)
treea3b27a7cac239a45dcb00a21e8b25a6dcc23450a /libavfilter
parent4da42ebe4486f2960d64135395b1a9ef705d9429 (diff)
lavfi: remove redundant checks after av_parse_video_rate()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_frei0r.c3
-rw-r--r--libavfilter/vsrc_color.c6
-rw-r--r--libavfilter/vsrc_mandelbrot.c3
-rw-r--r--libavfilter/vsrc_mptestsrc.c3
-rw-r--r--libavfilter/vsrc_testsrc.c3
5 files changed, 6 insertions, 12 deletions
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 17ee54c19d..1678b33562 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -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);
}
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index 7f4f4791ab..ba10ebf36f 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -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);
}
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index f65b43f540..26b392daad 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -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);
}
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index 8accabf4ab..485d44ec9b 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -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;
}
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 4b0e4b1b5b..08ed9be3b7 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -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;
}