summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-06 16:00:28 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-10 03:56:33 +0200
commitdff774042a6f63a5d4fe01c68a7f34e35c2c3c0e (patch)
treea328597c281bcdefa8ec8fe60eb9c7a88d7c7860
parentbf61cbb7fcd73001dde6e73ad636442fd18688fb (diff)
avcodec/mpegvideo_enc: Combine identical checks
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/mpegvideo_enc.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 0a1d0db86d..e5411f0393 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -527,10 +527,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
return AVERROR(EINVAL);
}
if ((s->codec_id == AV_CODEC_ID_H263 ||
- s->codec_id == AV_CODEC_ID_H263P) &&
+ s->codec_id == AV_CODEC_ID_H263P ||
+ s->codec_id == AV_CODEC_ID_RV20) &&
((avctx->width &3) ||
(avctx->height&3) )) {
- av_log(avctx, AV_LOG_ERROR, "w/h must be a multiple of 4\n");
+ av_log(avctx, AV_LOG_ERROR, "width and height must be a multiple of 4\n");
return AVERROR(EINVAL);
}
@@ -541,13 +542,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return AVERROR(EINVAL);
}
- if (s->codec_id == AV_CODEC_ID_RV20 &&
- (avctx->width &3 ||
- avctx->height&3 )) {
- av_log(avctx, AV_LOG_ERROR, "width and height must be a multiple of 4\n");
- return AVERROR(EINVAL);
- }
-
if ((s->codec_id == AV_CODEC_ID_WMV1 ||
s->codec_id == AV_CODEC_ID_WMV2) &&
avctx->width & 1) {