aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorJULIAN GARDNER <joolzg@btinternet.com>2011-05-26 15:32:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-26 21:38:10 +0200
commit5655469ee73bc7f5a975a909738a764b9be7949b (patch)
treec672d82a2826f46c38b90eeaa2e0d610726e3a72 /libavcodec/libx264.c
parent7e637b70ecd425fbe1479066a5751f26b9fce8a9 (diff)
downloadffmpeg-5655469ee73bc7f5a975a909738a764b9be7949b.tar.gz
libx264: support aspect Ratio Switch
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index d9bac17484..28683a930a 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -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 {