Browse Source

avcodec/libx264: Avoid reconfig on equivalent aspect ratios

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.8
Michael Niedermayer 10 years ago
parent
commit
7b1c03aa74
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavcodec/libx264.c

+ 1
- 2
libavcodec/libx264.c View File

@@ -170,8 +170,7 @@ static void reconfig_encoder(AVCodecContext *ctx, 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…
Cancel
Save