x265enc: Enable aspect ratio

x265 encoder need aspectRatioIdc == X265_EXTENDED_SAR if we want to use
sarWidth/sarHeight

https://bugzilla.gnome.org/show_bug.cgi?id=769716
This commit is contained in:
xlazom00 2016-08-10 22:50:12 +00:00 committed by Sebastian Dröge
parent ee5aa3d8b5
commit 00ac1c7eb4

View file

@ -659,6 +659,7 @@ gst_x265_enc_init_encoder (GstX265Enc * encoder)
encoder->x265param.sourceWidth = info->width; encoder->x265param.sourceWidth = info->width;
encoder->x265param.sourceHeight = info->height; encoder->x265param.sourceHeight = info->height;
if (info->par_d > 0) { if (info->par_d > 0) {
encoder->x265param.vui.aspectRatioIdc = X265_EXTENDED_SAR;
encoder->x265param.vui.sarWidth = info->par_n; encoder->x265param.vui.sarWidth = info->par_n;
encoder->x265param.vui.sarHeight = info->par_d; encoder->x265param.vui.sarHeight = info->par_d;
} }