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

Tomas Härdin tjoppen at acc.umu.se
Mon Dec 10 12:12:29 EET 2018


mån 2018-12-10 klockan 10:17 +0100 skrev Paul B Mahol:
> > Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavformat/mxfenc.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index 3549b4137d..006a9da1f8 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -2368,6 +2368,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));
> +            }
> +

Nice, look OK of course

/Tomas


More information about the ffmpeg-devel mailing list