mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
libx264: support aspect ratio switching
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
5b7a88f0ba
commit
0dd283faca
@ -148,6 +148,12 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
|
|||||||
x4->params.b_tff = frame->top_field_first;
|
x4->params.b_tff = frame->top_field_first;
|
||||||
x264_encoder_reconfig(x4->enc, &x4->params);
|
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 {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user