[FFmpeg-devel] [PATCH v6 1/3] avformat/mxfdec: set toolkit version metadata
Marton Balint
cus at passwd.hu
Mon Feb 1 21:15:33 EET 2021
On Mon, 1 Feb 2021, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
>
> Please check the string of toolkit version with below command:
> ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
> ./ffmpeg -i out.mxf
> ....
> toolkit_version : 58.65.101
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavformat/mxfdec.c | 25 +++++++++++++++++++++++++
> tests/ref/fate/mxf-probe-applehdr10 | 1 +
> tests/ref/fate/mxf-probe-dnxhd | 1 +
> 3 files changed, 27 insertions(+)
>
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index afff204..61c8104 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -1970,6 +1970,18 @@ static int mxf_umid_to_str(UID ul, UID uid, char **str)
> return 0;
> }
>
> +static int mxf_version_to_str(uint16_t major, uint16_t minor, uint16_t tertiary, char **str)
> +{
> + int size = sizeof(major) * 5 + 1;
> +
> + *str = av_mallocz(size);
> + if (!*str)
> + return AVERROR(ENOMEM);
> +
> + snprintf(*str, size, "%d.%d.%d", major, minor, tertiary);
ToolkitVersion is a ProductVersion which means it consists of 5 UInt16
numbers, not 3. So you should present all 5 values.
Regards,
Marton
More information about the ffmpeg-devel
mailing list