Mercurial > libavcodec.hg
changeset 8982:a24c04956930 libavcodec
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.
author | iive |
---|---|
date | Thu, 19 Feb 2009 08:39:47 +0000 |
parents | dc19e4d7d0eb |
children | 436e7d43db62 |
files | mpegvideo.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo.c Thu Feb 19 00:54:59 2009 +0000 +++ b/mpegvideo.c Thu Feb 19 08:39:47 2009 +0000 @@ -402,6 +402,11 @@ 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;