aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-08-25 18:42:02 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-10-01 21:54:53 +0200
commit7ffa458d600eccbd2582d755af75c03bdaa9e51f (patch)
tree0be93ef427e5af97d21e8fe8d557c40d78139310
parent61b7676bd5a6ae79e4a607a600d3741c84ec6d8a (diff)
downloadffmpeg-7ffa458d600eccbd2582d755af75c03bdaa9e51f.tar.gz
lavfi/movie: Use filter thread count for decoding threads.
Fixes ticket #7542.
-rw-r--r--libavfilter/src_movie.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
index bcabfcc4c2..79423a894d 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;
}