mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/libx264: Avoid reconfig on equivalent aspect ratios
Workaround for ticket #4287. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 7b1c03aa744f1f82fe30ea2cd2aeef2ea01d5ce9) Conflicts: libavcodec/libx264.c
This commit is contained in:
parent
a9b600cf39
commit
8749b83e0b
@ -191,8 +191,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
|
||||
x4->params.b_tff = frame->top_field_first;
|
||||
x264_encoder_reconfig(x4->enc, &x4->params);
|
||||
}
|
||||
if (x4->params.vui.i_sar_height != ctx->sample_aspect_ratio.den ||
|
||||
x4->params.vui.i_sar_width != ctx->sample_aspect_ratio.num) {
|
||||
if (x4->params.vui.i_sar_height*ctx->sample_aspect_ratio.num != ctx->sample_aspect_ratio.den * x4->params.vui.i_sar_width) {
|
||||
x4->params.vui.i_sar_height = ctx->sample_aspect_ratio.den;
|
||||
x4->params.vui.i_sar_width = ctx->sample_aspect_ratio.num;
|
||||
x264_encoder_reconfig(x4->enc, &x4->params);
|
||||
|
Loading…
x
Reference in New Issue
Block a user