Mercurial > libavcodec.hg
diff mpegvideo.c @ 4206:be94e97ecb6e libavcodec
throw error if unsupported resolution is used with h261
author | bcoudurier |
---|---|
date | Thu, 16 Nov 2006 09:58:34 +0000 |
parents | 3c98b0938897 |
children | 7583920b3217 |
line wrap: on
line diff
--- a/mpegvideo.c Wed Nov 15 17:58:35 2006 +0000 +++ b/mpegvideo.c Thu Nov 16 09:58:34 2006 +0000 @@ -1208,6 +1208,10 @@ 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;