avcodec/mpegvideo_enc: Combine identical checks
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
bf61cbb7fc
commit
dff774042a
@ -527,10 +527,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
if ((s->codec_id == AV_CODEC_ID_H263 ||
|
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->width &3) ||
|
||||||
(avctx->height&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);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,13 +542,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
return AVERROR(EINVAL);
|
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 ||
|
if ((s->codec_id == AV_CODEC_ID_WMV1 ||
|
||||||
s->codec_id == AV_CODEC_ID_WMV2) &&
|
s->codec_id == AV_CODEC_ID_WMV2) &&
|
||||||
avctx->width & 1) {
|
avctx->width & 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user