avformat/mxfenc: calculate and store DAR from user SAR

This commit is contained in:
Paul B Mahol 2018-12-10 10:15:27 +01:00
parent 5e0d54a031
commit 14156e607d
1 changed files with 5 additions and 0 deletions

View File

@ -2412,6 +2412,11 @@ static int mxf_write_header(AVFormatContext *s)
sc->v_chroma_sub_sample = 2;
sc->color_siting = 0xFF;
if (st->codecpar->sample_aspect_ratio.num && st->codecpar->sample_aspect_ratio.den) {
sc->aspect_ratio = av_mul_q(st->codecpar->sample_aspect_ratio,
av_make_q(st->codecpar->width, st->codecpar->height));
}
if (pix_desc) {
sc->component_depth = pix_desc->comp[0].depth;
sc->h_chroma_sub_sample = 1 << pix_desc->log2_chroma_w;