X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fsrc_movie.c;h=79423a894d7c804ffd7072469afccd5100d58687;hb=273886fa60c347e07c57ec2b927f70ad94fc84bb;hp=bcabfcc4c295e0b2cd220fb168c614ad5a0d111a;hpb=a024c3ce9a502849013a4aa2c0a6de0c9270261c;p=ffmpeg diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index bcabfcc4c29..79423a894d7 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -153,14 +153,14 @@ static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec) return found; } -static int open_stream(void *log, MovieStream *st) +static int open_stream(AVFilterContext *ctx, MovieStream *st) { AVCodec *codec; int ret; codec = avcodec_find_decoder(st->st->codecpar->codec_id); if (!codec) { - av_log(log, AV_LOG_ERROR, "Failed to find any codec\n"); + av_log(ctx, AV_LOG_ERROR, "Failed to find any codec\n"); return AVERROR(EINVAL); } @@ -173,9 +173,10 @@ static int open_stream(void *log, MovieStream *st) return ret; st->codec_ctx->refcounted_frames = 1; + st->codec_ctx->thread_count = ff_filter_get_nb_threads(ctx); if ((ret = avcodec_open2(st->codec_ctx, codec, NULL)) < 0) { - av_log(log, AV_LOG_ERROR, "Failed to open codec\n"); + av_log(ctx, AV_LOG_ERROR, "Failed to open codec\n"); return ret; }