summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-02 21:49:53 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-06 15:00:21 +0200
commitd74ca6fdb4255ef8009355ebf6acbd0629047009 (patch)
tree06ceb82a0d7a34fa82bb90ebced0939ab2eae78a /libavcodec/mpegvideo_enc.c
parent759d216c47080660bbcee7f0c693d383fdf45808 (diff)
downloadffmpeg-d74ca6fdb4255ef8009355ebf6acbd0629047009.tar.gz
avcodec/mpegvideo_enc: Move H.261 size check to h261enc.c
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 7b3f721ef2..2d305b9bf2 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -682,14 +682,9 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
case AV_CODEC_ID_H261:
if (!CONFIG_H261_ENCODER)
return AVERROR_ENCODER_NOT_FOUND;
- if (ff_h261_get_picture_format(s->width, s->height) < 0) {
- av_log(avctx, AV_LOG_ERROR,
- "The specified picture size of %dx%d is not valid for the "
- "H.261 codec.\nValid sizes are 176x144, 352x288\n",
- s->width, s->height);
- return AVERROR(EINVAL);
- }
- ff_h261_encode_init(s);
+ ret = ff_h261_encode_init(s);
+ if (ret < 0)
+ return ret;
s->out_format = FMT_H261;
avctx->delay = 0;
s->low_delay = 1;