diff mbox series

[FFmpeg-devel,02/49] fftools/ffmpeg: move a comment to a more appropriate place

Message ID 20220404113037.13070-3-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/49] fftools/ffmpeg: drop an obsolete hack | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov April 4, 2022, 11:29 a.m. UTC
---
 fftools/ffmpeg.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

James Almer April 6, 2022, 11:20 a.m. UTC | #1
On 4/4/2022 8:29 AM, Anton Khirnov wrote:
> ---
>   fftools/ffmpeg.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index afa1b012a6..13be32f0cf 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -1238,6 +1238,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);
>   
> @@ -1392,11 +1397,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)

Patches 1 and 2 are trivial and lgtm.
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index afa1b012a6..13be32f0cf 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1238,6 +1238,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);
 
@@ -1392,11 +1397,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)