comparison mpegvideo_enc.c @ 10155:30e57cd5d5f5 libavcodec

Check for thread_count==0. fixed issue1333
author michael
date Thu, 10 Sep 2009 14:12:05 +0000
parents 38cfe222e1a4
children 59ec306245a4
comparison
equal deleted inserted replaced
10154:8f578f86c51a 10155:30e57cd5d5f5
436 436
437 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4 437 if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4
438 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO 438 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO
439 && (s->codec_id != CODEC_ID_H263P || !(s->flags & CODEC_FLAG_H263P_SLICE_STRUCT))){ 439 && (s->codec_id != CODEC_ID_H263P || !(s->flags & CODEC_FLAG_H263P_SLICE_STRUCT))){
440 av_log(avctx, AV_LOG_ERROR, "multi threaded encoding not supported by codec\n"); 440 av_log(avctx, AV_LOG_ERROR, "multi threaded encoding not supported by codec\n");
441 return -1;
442 }
443
444 if(s->avctx->thread_count < 1){
445 av_log(avctx, AV_LOG_ERROR, "automatic thread number detection not supported by codec, patch welcome\n");
441 return -1; 446 return -1;
442 } 447 }
443 448
444 if(s->avctx->thread_count > 1) 449 if(s->avctx->thread_count > 1)
445 s->rtp_mode= 1; 450 s->rtp_mode= 1;