mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
flac muxer: write WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag for multichannel files
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/channel_layout.h"
|
||||
|
||||
#include "libavcodec/flac.h"
|
||||
#include "libavcodec/bytestream.h"
|
||||
#include "avformat.h"
|
||||
@@ -45,3 +47,17 @@ int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ff_flac_is_native_layout(uint64_t channel_layout)
|
||||
{
|
||||
if (channel_layout == AV_CH_LAYOUT_MONO ||
|
||||
channel_layout == AV_CH_LAYOUT_STEREO ||
|
||||
channel_layout == AV_CH_LAYOUT_SURROUND ||
|
||||
channel_layout == AV_CH_LAYOUT_QUAD ||
|
||||
channel_layout == AV_CH_LAYOUT_5POINT0 ||
|
||||
channel_layout == AV_CH_LAYOUT_5POINT1 ||
|
||||
channel_layout == AV_CH_LAYOUT_6POINT1 ||
|
||||
channel_layout == AV_CH_LAYOUT_7POINT1)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user