fftools/ffmpeg: call av_guess_frame_rate() when opening the file

It is currently called when configuring the filter, which races with the
demuxer thread.
This commit is contained in:
Anton Khirnov
2022-08-18 15:08:26 +02:00
parent 14726571dd
commit f23e3ce858
3 changed files with 5 additions and 1 deletions

View File

@@ -738,7 +738,7 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
}
if (!fr.num)
fr = av_guess_frame_rate(input_files[ist->file_index]->ctx, ist->st, NULL);
fr = ist->framerate_guessed;
if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_SUBTITLE) {
ret = sub2video_prepare(ist, ifilter);