[FFmpeg-devel] [PATCH 22/24] ffmpeg: move a comment to a more appropriate place

Anton Khirnov anton at khirnov.net
Mon Dec 13 17:20:40 EET 2021


---
 fftools/ffmpeg.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index bbedf867b4..538601e440 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1064,6 +1064,11 @@ static void do_video_out(OutputFile *of,
         }
     }
 
+    /*
+     * For video, number of frames in == number of packets out.
+     * But there may be reordering, so we can't throw away frames on encoder
+     * flush, we need to limit them here, before they go into encoder.
+     */
     nb_frames = FFMIN(nb_frames, ost->max_frames - ost->frame_number);
     nb0_frames = FFMIN(nb0_frames, nb_frames);
 
@@ -1217,11 +1222,6 @@ static void do_video_out(OutputFile *of,
             }
         }
         ost->sync_opts++;
-        /*
-         * For video, number of frames in == number of packets out.
-         * But there may be reordering, so we can't throw away frames on encoder
-         * flush, we need to limit them here, before they go into encoder.
-         */
         ost->frame_number++;
 
         if (vstats_filename && frame_size)
-- 
2.33.0



More information about the ffmpeg-devel mailing list