[FFmpeg-cvslog] libx264: support aspect Ratio Switch
JULIAN GARDNER
git at videolan.org
Thu May 26 22:01:44 CEST 2011
ffmpeg | branch: master | JULIAN GARDNER <joolzg at btinternet.com> | Thu May 26 15:32:14 2011 +0200| [5655469ee73bc7f5a975a909738a764b9be7949b] | committer: Michael Niedermayer
libx264: support aspect Ratio Switch
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5655469ee73bc7f5a975a909738a764b9be7949b
---
libavcodec/libx264.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index d9bac17..28683a9 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 {
More information about the ffmpeg-cvslog
mailing list