summaryrefslogtreecommitdiff
path: root/libavformat/flacenc_header.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-05-25 11:34:32 +0200
committerAnton Khirnov <anton@khirnov.net>2014-05-28 07:47:31 +0200
commit54ed488b1af583df6c9d2a73b4a44f16b7e4f82c (patch)
tree86ebb30c14f087e7050b2ee1612e48c0b4dd1876 /libavformat/flacenc_header.c
parentd6b9ce99ea384fb676561461768b8316725a4ccd (diff)
flac muxer: write WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag for multichannel files
Diffstat (limited to 'libavformat/flacenc_header.c')
-rw-r--r--libavformat/flacenc_header.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/flacenc_header.c b/libavformat/flacenc_header.c
index c1f7c86554..0d19b3c876 100644
--- a/libavformat/flacenc_header.c
+++ b/libavformat/flacenc_header.c
@@ -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;
+}