[FFmpeg-cvslog] fftools/ffmpeg: mark all encode sync queues as done before flushing encoders

Anton Khirnov git at videolan.org
Sat Aug 13 15:01:26 EEST 2022


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Aug  9 15:01:33 2022 +0200| [5d499d32505be79f1cc7608106f01fee84c91085] | committer: Anton Khirnov

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d499d32505be79f1cc7608106f01fee84c91085
---

 fftools/ffmpeg.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 0682a6fcc5..16b1ba8af7 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -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;



More information about the ffmpeg-cvslog mailing list