Browse Source

libx264: support aspect ratio switching

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n1.0
JULIAN GARDNER Anton Khirnov 13 years ago
parent
commit
0dd283faca
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libavcodec/libx264.c

+ 6
- 0
libavcodec/libx264.c View File

@@ -148,6 +148,12 @@ 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) {
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);
}
}

do {


Loading…
Cancel
Save