libav: Switch to new channel layout API
A new channel layout API was added in 5.1, deprecating the one we are currently using : https://github.com/FFmpeg/FFmpeg/commit/086a8048061bf9fb4c63943f6962db48175f655c
If we switch to a minimum version of 5.1, we should unconditionally switch, else make it compile-time optional.
Deprecated API being used
-
av_get_channel_layout_nb_channels()
, useAVChannelLayout.nb_channels
instead -
AVFrame->channel_layout
, useAVFrame->ch_layout
instead -
AVFrame->channels
, use `AVFrame->ch_layout instead