diff options
author | JULIAN GARDNER <joolzg@btinternet.com> | 2011-05-26 15:32:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-26 21:38:10 +0200 |
commit | 5655469ee73bc7f5a975a909738a764b9be7949b (patch) | |
tree | c672d82a2826f46c38b90eeaa2e0d610726e3a72 /libavcodec/libx264.c | |
parent | 7e637b70ecd425fbe1479066a5751f26b9fce8a9 (diff) | |
download | ffmpeg-5655469ee73bc7f5a975a909738a764b9be7949b.tar.gz |
libx264: support aspect Ratio Switch
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r-- | libavcodec/libx264.c | 6 |
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 { |