fftools/ffmpeg: mark all encode sync queues as done before flushing encoders

This commit is contained in:
Anton Khirnov 2022-08-09 15:01:33 +02:00
parent f6a36c7cf9
commit 5d499d3250
1 changed files with 7 additions and 0 deletions

View File

@ -1780,6 +1780,13 @@ static void flush_encoders(void)
{
int i, ret;
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
OutputFile *of = output_files[ost->file_index];
if (ost->sq_idx_encode >= 0)
sq_send(of->sq_encode, ost->sq_idx_encode, SQFRAME(NULL));
}
for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
AVCodecContext *enc = ost->enc_ctx;