History

lavfi/movie: Use filter thread count for decoding threads.

Fixes ticket #7542.

Carl Eugen Hoyos committed 7 years ago

Commit 7ffa4581 parent 61b76761 file · +4 −3Browse files

Unified · Split

libavfilter/src_movie.c+4−3
@@ -153,14 +153,14 @@ static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec) · 152 unmodified lines
153153 return found;
154154 }
155155
156−static int open_stream(void *log, MovieStream *st)
156+static int open_stream(AVFilterContext *ctx, MovieStream *st)
157157 {
158158 AVCodec *codec;
159159 int ret;
160160
161161 codec = avcodec_find_decoder(st->st->codecpar->codec_id);
162162 if (!codec) {
163− av_log(log, AV_LOG_ERROR, "Failed to find any codec\n");
163+ av_log(ctx, AV_LOG_ERROR, "Failed to find any codec\n");
164164 return AVERROR(EINVAL);
165165 }
166166
@@ -173,9 +173,10 @@ static int open_stream(void *log, MovieStream *st) · 6 unmodified lines
173173 return ret;
174174
175175 st->codec_ctx->refcounted_frames = 1;
176+ st->codec_ctx->thread_count = ff_filter_get_nb_threads(ctx);
176177
177178 if ((ret = avcodec_open2(st->codec_ctx, codec, NULL)) < 0) {
178− av_log(log, AV_LOG_ERROR, "Failed to open codec\n");
179+ av_log(ctx, AV_LOG_ERROR, "Failed to open codec\n");
179180 return ret;
180181 }
181182

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t