[FFmpeg-devel] [PATCH] avformat/mxfdec: export operational pattern UL as file metadata

Marton Balint cus at passwd.hu
Thu Apr 11 22:48:21 EEST 2019



On Mon, 8 Apr 2019, Tomas Härdin wrote:

> On 2019-04-03 21:35, Marton Balint wrote:
>> Can be useful for API users as ffmpeg/libavformat can't properly support 
> some
>> operational patterns.
>>
>> Signed-off-by: Marton Balint <cus at passwd.hu>
>> ---
>>   libavformat/mxfdec.c           | 7 +++++++
>>   tests/ref/fate/mxf-probe-d10   | 1 +
>>   tests/ref/fate/mxf-probe-dnxhd | 1 +
>>   tests/ref/fate/mxf-probe-dv25  | 1 +
>>   4 files changed, 10 insertions(+)
>>
>> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
>> index 1ba8ecd4a6..8c65a2bbcf 100644
>> --- a/libavformat/mxfdec.c
>> +++ b/libavformat/mxfdec.c
>> @@ -718,6 +719,12 @@ static int mxf_read_partition_pack(void *arg, 
> AVIOContext *pb, int tag, int size
>>       }
>>       nb_essence_containers = avio_rb32(pb);
>> 
>> +    if (partition->type == Header) {
>> +        char str[36];
>> +        snprintf(str, sizeof(str), "%08x.%08x.%08x.%08x", AV_RB32(&op[0]), 
> AV_RB32(&op[4]), AV_RB32(&op[8]), AV_RB32(&op[12]));
>
> I was unsure wheter this was the official format for UL, so I went and 
> checked. SMPTE uses the same in their XML registry: 
> https://registry.smpte-ra.org/view/published/Labels.xml
>
> Example: urn:smpte:ul:060e2b34.04010101.01010100.00000000
>
> In other words: looks OK to me

Thanks, applied.

Regards,
Marton


More information about the ffmpeg-devel mailing list