fftools/ffmpeg: open decoders right after we know they are needed

Will allow initializing subtitle encoding earlier.
This commit is contained in:
Anton Khirnov
2023-04-11 13:27:44 +02:00
parent c8fa58430e
commit 2058402e00
2 changed files with 6 additions and 5 deletions

View File

@@ -1882,11 +1882,6 @@ static int transcode_init(void)
ifile->streams[j]->start = av_gettime_relative();
}
/* init input streams */
for (InputStream *ist = ist_iter(NULL); ist; ist = ist_iter(ist))
if (ist->decoding_needed && (ret = dec_open(ist)) < 0)
goto dump_format;
/*
* initialize stream copy and subtitle/data streams.
* Encoded AVFrame based streams will get initialized when the first AVFrame