diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-11-16 09:58:34 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-11-16 09:58:34 +0000 |
commit | a57d13b71375a127820220efeb35d03288c43ac2 (patch) | |
tree | b6c53ecce2cdf29c09bc6c0bbc369b854023c460 /libavcodec/mpegvideo.c | |
parent | 09e151848a02f3c2b7a52ae1559f0e275056b62d (diff) | |
download | ffmpeg-a57d13b71375a127820220efeb35d03288c43ac2.tar.gz |
throw error if unsupported resolution is used with h261
Originally committed as revision 7097 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index fda536c068..2fac26d5eb 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1208,6 +1208,10 @@ int MPV_encode_init(AVCodecContext *avctx) s->low_delay=1; break; case CODEC_ID_H261: + 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 -1; + } s->out_format = FMT_H261; avctx->delay=0; s->low_delay=1; |