[FFmpeg-cvslog] avformat/mxfenc: calculate and store DAR from user SAR

Paul B Mahol git at videolan.org
Mon Dec 10 18:38:14 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Dec 10 10:15:27 2018 +0100| [14156e607d4941079a400c3969173518ebb6f6ed] | committer: Paul B Mahol

avformat/mxfenc: calculate and store DAR from user SAR

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=14156e607d4941079a400c3969173518ebb6f6ed
---

 libavformat/mxfenc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index e481b19ff3..4f9f353ffc 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -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;



More information about the ffmpeg-cvslog mailing list