Commit 14156e60 authored by Paul B Mahol's avatar Paul B Mahol

avformat/mxfenc: calculate and store DAR from user SAR

parent 5e0d54a0
...@@ -2412,6 +2412,11 @@ static int mxf_write_header(AVFormatContext *s) ...@@ -2412,6 +2412,11 @@ static int mxf_write_header(AVFormatContext *s)
sc->v_chroma_sub_sample = 2; sc->v_chroma_sub_sample = 2;
sc->color_siting = 0xFF; 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) { if (pix_desc) {
sc->component_depth = pix_desc->comp[0].depth; sc->component_depth = pix_desc->comp[0].depth;
sc->h_chroma_sub_sample = 1 << pix_desc->log2_chroma_w; sc->h_chroma_sub_sample = 1 << pix_desc->log2_chroma_w;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment