Commit 19220677 authored by iive's avatar iive

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17452 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 712afbfc
...@@ -402,6 +402,11 @@ int MPV_common_init(MpegEncContext *s) ...@@ -402,6 +402,11 @@ int MPV_common_init(MpegEncContext *s)
s->mb_height = (s->height + 15) / 16; 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)){ 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"); av_log(s->avctx, AV_LOG_ERROR, "too many threads\n");
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment