1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-10 09:31:06 +02:00

libx264: support aspect Ratio Switch

This commit is contained in:
JULIAN GARDNER 2011-05-26 15:32:14 +02:00 committed by Michael Niedermayer
parent 7e637b70ec
commit 5655469ee7

View File

@ -119,6 +119,12 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
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 {