[FFmpeg-devel] [PATCH 02/12] avformat/mxfdec: add support for determining essence wrapping scheme

Marton Balint cus at passwd.hu
Wed Jun 13 21:30:59 EEST 2018



On Wed, 13 Jun 2018, Tomas Härdin wrote:

> sön 2018-06-10 klockan 12:36 +0200 skrev Marton Balint:
>> Some code is based on bmxlib-libmxf/mxf/mxf_utils.c.
>> 
>> > Signed-off-by: Marton Balint <cus at passwd.hu>
>> ---
>>  libavformat/mxf.h    |  9 ++++++
>>  libavformat/mxfdec.c | 79 +++++++++++++++++++++++++++++++++++++++-------------
>>  2 files changed, 68 insertions(+), 20 deletions(-)
>> 
>> diff --git a/libavformat/mxf.h b/libavformat/mxf.h
>>  
>> +static MXFWrappingScheme mxf_get_wrapping_kind(UID *essence_container_ul)
>> +{
>> +    int val;
>> +    const MXFCodecUL *codec_ul;
>> +
>> +    codec_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, essence_container_ul);
>> +    if (!codec_ul->uid[0])
>> +        codec_ul = mxf_get_codec_ul(mxf_sound_essence_container_uls, essence_container_ul);
>> +    if (!codec_ul->uid[0])
>> +        codec_ul = mxf_get_codec_ul(mxf_data_essence_container_uls, essence_container_ul);
>> +    if (!codec_ul->uid[0] || !codec_ul->wrapping_indicator_pos)
>> +        return UnknownWrapped;
>> +
>> +    val = (*essence_container_ul)[codec_ul->wrapping_indicator_pos];
>
> Maybe a check on wrapping_indicator_pos? Not really needed since the
> value comes from a table, but I felt I should mention it at least.

matching_len also lacks such checks, so I don't think its necessary.

Regards,
Marton


More information about the ffmpeg-devel mailing list