diff mbox series

[FFmpeg-devel] ffmpeg: remove premature rescaling of forced_keyframe times

Message ID 20200102155119.3926-1-ffmpeg@gyani.pro
State Accepted
Headers show
Series [FFmpeg-devel] ffmpeg: remove premature rescaling of forced_keyframe times | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Gyan Doshi Jan. 2, 2020, 3:51 p.m. UTC
The user-set forced KF times are parsed *after* this deleted
loop and rescaled right after parsing.
---
 fftools/ffmpeg.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Gyan Doshi Jan. 4, 2020, 4:32 a.m. UTC | #1
On 02-01-2020 09:21 pm, Gyan Doshi wrote:
> The user-set forced KF times are parsed *after* this deleted
> loop and rescaled right after parsing.
> ---
>   fftools/ffmpeg.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index 9af2bc2fb5..2c5fcc0532 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -3367,10 +3367,6 @@ static int init_output_stream_encode(OutputStream *ost)
>               av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"
>                                          "Please consider specifying a lower framerate, a different muxer or -vsync 2\n");
>           }
> -        for (j = 0; j < ost->forced_kf_count; j++)
> -            ost->forced_kf_pts[j] = av_rescale_q(ost->forced_kf_pts[j],
> -                                                 AV_TIME_BASE_Q,
> -                                                 enc_ctx->time_base);
>   
>           enc_ctx->width  = av_buffersink_get_w(ost->filter->filter);
>           enc_ctx->height = av_buffersink_get_h(ost->filter->filter);

Will push tonight.

Gyan
Gyan Doshi Jan. 5, 2020, 7:01 a.m. UTC | #2
On 04-01-2020 10:02 am, Gyan wrote:
>
>
> On 02-01-2020 09:21 pm, Gyan Doshi wrote:
>> The user-set forced KF times are parsed *after* this deleted
>> loop and rescaled right after parsing.
>> ---
>>   fftools/ffmpeg.c | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
>> index 9af2bc2fb5..2c5fcc0532 100644
>> --- a/fftools/ffmpeg.c
>> +++ b/fftools/ffmpeg.c
>> @@ -3367,10 +3367,6 @@ static int 
>> init_output_stream_encode(OutputStream *ost)
>>               av_log(oc, AV_LOG_WARNING, "Frame rate very high for a 
>> muxer not efficiently supporting it.\n"
>>                                          "Please consider specifying 
>> a lower framerate, a different muxer or -vsync 2\n");
>>           }
>> -        for (j = 0; j < ost->forced_kf_count; j++)
>> -            ost->forced_kf_pts[j] = av_rescale_q(ost->forced_kf_pts[j],
>> - AV_TIME_BASE_Q,
>> - enc_ctx->time_base);
>>             enc_ctx->width  = av_buffersink_get_w(ost->filter->filter);
>>           enc_ctx->height = av_buffersink_get_h(ost->filter->filter);
>
> Will push tonight.

Pushed as fa3ad7bbc68d33a08f6b3a03d097ecf37670059d

Gyan
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 9af2bc2fb5..2c5fcc0532 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3367,10 +3367,6 @@  static int init_output_stream_encode(OutputStream *ost)
             av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n"
                                        "Please consider specifying a lower framerate, a different muxer or -vsync 2\n");
         }
-        for (j = 0; j < ost->forced_kf_count; j++)
-            ost->forced_kf_pts[j] = av_rescale_q(ost->forced_kf_pts[j],
-                                                 AV_TIME_BASE_Q,
-                                                 enc_ctx->time_base);
 
         enc_ctx->width  = av_buffersink_get_w(ost->filter->filter);
         enc_ctx->height = av_buffersink_get_h(ost->filter->filter);