X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fpthread.c;h=482c8456afcb103760b07781120a70a4710f8cb2;hb=ad12e9e8c054b904d564e1a183b73104bca2e3d5;hp=c23098fbf54c55422874addcd7f69db018249dbc;hpb=6999f8bcf56bb167124bf85bdaa89090acdd5d9c;p=ffmpeg diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index c23098fbf54..482c8456afc 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -467,7 +467,6 @@ static int update_context_from_user(AVCodecContext *dst, AVCodecContext *src) dst->release_buffer = src->release_buffer; dst->opaque = src->opaque; - dst->dsp_mask = src->dsp_mask; dst->debug = src->debug; dst->debug_mv = src->debug_mv; @@ -614,11 +613,12 @@ int ff_thread_decode_frame(AVCodecContext *avctx, * If we're still receiving the initial packets, don't return a frame. */ - if (fctx->delaying && avpkt->size) { + if (fctx->delaying) { if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0; *got_picture_ptr=0; - return avpkt->size; + if (avpkt->size) + return avpkt->size; } /* @@ -1051,6 +1051,11 @@ static void validate_thread_parameters(AVCodecContext *avctx) avctx->thread_count = 1; avctx->active_thread_type = 0; } + + if (avctx->thread_count > MAX_AUTO_THREADS) + av_log(avctx, AV_LOG_WARNING, + "Application has requested %d threads. Using a thread count greater than %d is not recommended.\n", + avctx->thread_count, MAX_AUTO_THREADS); } int ff_thread_init(AVCodecContext *avctx)