summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-08-09 15:01:33 +0200
committerAnton Khirnov <anton@khirnov.net>2022-08-13 12:41:05 +0200
commit5d499d32505be79f1cc7608106f01fee84c91085 (patch)
tree6dbe31d1d5e152db98a4c4002a0af7fbe638c170 /fftools
parentf6a36c7cf90dc71400c4a1ba0f5c5e8fbbf6d1bf (diff)
fftools/ffmpeg: mark all encode sync queues as done before flushing encoders
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 0682a6fcc5..16b1ba8af7 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1782,6 +1782,13 @@ static void flush_encoders(void)
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;
OutputFile *of = output_files[ost->file_index];