summaryrefslogtreecommitdiff
path: root/libavformat/flacenc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-31 13:57:59 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:32 -0300
commite5818ab328ba33e7a1e462c9a9c992bfc5a8adbc (patch)
treec68e275dbf33bbbdcf54387803e06e7c845ed666 /libavformat/flacenc.c
parentd68f938c2dae8231e8ca38cb37bb86d712fde071 (diff)
downloadffmpeg-e5818ab328ba33e7a1e462c9a9c992bfc5a8adbc.tar.gz
flac: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/flacenc.c')
-rw-r--r--libavformat/flacenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c
index b267197ccc..cf44ff7001 100644
--- a/libavformat/flacenc.c
+++ b/libavformat/flacenc.c
@@ -238,9 +238,9 @@ static int flac_init(struct AVFormatContext *s)
}
/* add the channel layout tag */
- if (par->channel_layout &&
- !(par->channel_layout & ~0x3ffffULL) &&
- !ff_flac_is_native_layout(par->channel_layout)) {
+ if (par->ch_layout.order == AV_CHANNEL_ORDER_NATIVE &&
+ !(par->ch_layout.u.mask & ~0x3ffffULL) &&
+ !ff_flac_is_native_layout(par->ch_layout.u.mask)) {
AVDictionaryEntry *chmask = av_dict_get(s->metadata, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK",
NULL, 0);
@@ -249,7 +249,7 @@ static int flac_init(struct AVFormatContext *s)
"already present, this muxer will not overwrite it.\n");
} else {
uint8_t buf[32];
- snprintf(buf, sizeof(buf), "0x%"PRIx64, par->channel_layout);
+ snprintf(buf, sizeof(buf), "0x%"PRIx64, par->ch_layout.u.mask);
av_dict_set(&s->metadata, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", buf, 0);
}
}