[FFmpeg-devel] [PATCH] avformat/mxfdec: signal channel layouts using the new channel layout api

Marton Balint cus at passwd.hu
Sat Mar 9 04:18:27 EET 2024



On Fri, 8 Mar 2024, James Almer wrote:

> On 3/8/2024 5:13 PM, Marton Balint wrote:
>>  Signed-off-by: Marton Balint <cus at passwd.hu>
>>  ---
>>    libavformat/mxfdec.c | 129 ++++++++++++++++++-------------------------
>>    1 file changed, 53 insertions(+), 76 deletions(-)
>>
>>  diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
>>  index 289db9833c..e2f4a22983 100644
>>  --- a/libavformat/mxfdec.c
>>  +++ b/libavformat/mxfdec.c

[...]

>>  +    ret = av_channel_layout_retype(ch_layout, AV_CHANNEL_ORDER_NATIVE,
>>  AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS);
>>  +    if (ret == AVERROR(ENOSYS))
>>  +        ret = av_channel_layout_retype(ch_layout,
>>  AV_CHANNEL_ORDER_UNSPEC, AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS);
>>  +    if (ret < 0 && ret != AVERROR(ENOSYS))
>>  +        return ret;
>>
>>        return 0;
>>    }
>
> I'm not against this patch, but shouldn't we make sure for example that swr 
> supports custom layouts first?

I don't really know what is the best approach here. Sure, some stuff will 
break if it encounters a custom layout. But nobody will fix it, if no 
custom layouts are ever encountered...

Regards,
Marton


More information about the ffmpeg-devel mailing list