diff options
author | Ivan Kalvachev <ikalvachev@gmail.com> | 2009-02-19 08:39:47 +0000 |
---|---|---|
committer | Ivan Kalvachev <ikalvachev@gmail.com> | 2009-02-19 08:39:47 +0000 |
commit | 9cfc1b3a840926435c2024fe7537e648405704fc (patch) | |
tree | 1fc5bf688923bd2cbbfb32702f769a37889d1978 /libavcodec | |
parent | e10252483e25ab8d5208af56d608c1bd6cd2d06f (diff) | |
download | ffmpeg-9cfc1b3a840926435c2024fe7537e648405704fc.tar.gz |
Exit with error if MPV_common_init() is called with PIX_FMT_NONE.
Give nice error message to fix codecs that call it this way.
Originally committed as revision 17452 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 409661eceb..2eec211abc 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -402,6 +402,11 @@ int MPV_common_init(MpegEncContext *s) s->mb_height = (s->height + 15) / 16; + if(s->avctx->pix_fmt == PIX_FMT_NONE){ + av_log(s->avctx, AV_LOG_ERROR, "decoding to PIX_FMT_NONE is not supported.\n"); + return -1; + } + if(s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb_height && s->mb_height)){ av_log(s->avctx, AV_LOG_ERROR, "too many threads\n"); return -1; |