Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-31 14:43:12 +0300
committerJames Almer <jamrial@gmail.com>2022-03-15 15:42:31 +0300
commite4fc86a45877faccff8ee73be76a20a720a85de7 (patch)
tree2b9f3195a20f961e8e4576d0100fb15998dce388
parent3b3b8eb8ef5a92263e17f504009d335b7d2b6361 (diff)
dash: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/dashenc.c2
-rw-r--r--libavformat/dauddec.c3
-rw-r--r--libavformat/daudenc.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 4709bc6615..9a97838f5c 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -859,7 +859,7 @@ static int write_adaptation_set(AVFormatContext *s, AVIOContext *out, int as_ind
avio_printf(out, "\t\t\t<Representation id=\"%d\" mimeType=\"audio/%s\" codecs=\"%s\"%s audioSamplingRate=\"%d\">\n",
i, os->format_name, os->codec_str, bandwidth_str, s->streams[i]->codecpar->sample_rate);
avio_printf(out, "\t\t\t\t<AudioChannelConfiguration schemeIdUri=\"urn:mpeg:dash:23003:3:audio_channel_configuration:2011\" value=\"%d\" />\n",
- s->streams[i]->codecpar->channels);
+ s->streams[i]->codecpar->ch_layout.nb_channels);
}
if (!final && c->write_prft && os->producer_reference_time_str[0]) {
avio_printf(out, "\t\t\t\t<ProducerReferenceTime id=\"%d\" inband=\"true\" type=\"%s\" wallClockTime=\"%s\" presentationTime=\"%"PRId64"\">\n",
diff --git a/libavformat/dauddec.c b/libavformat/dauddec.c
index 6a5962c238..dbbd39a3b4 100644
--- a/libavformat/dauddec.c
+++ b/libavformat/dauddec.c
@@ -29,8 +29,7 @@ static int daud_header(AVFormatContext *s) {
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_PCM_S24DAUD;
st->codecpar->codec_tag = MKTAG('d', 'a', 'u', 'd');
- st->codecpar->channels = 6;
- st->codecpar->channel_layout = AV_CH_LAYOUT_5POINT1;
+ st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1;
st->codecpar->sample_rate = 96000;
st->codecpar->bit_rate = 3 * 6 * 96000 * 8;
st->codecpar->block_align = 3 * 6;
diff --git a/libavformat/daudenc.c b/libavformat/daudenc.c
index 183a08ba30..2e252449e9 100644
--- a/libavformat/daudenc.c
+++ b/libavformat/daudenc.c
@@ -24,7 +24,7 @@
static int daud_init(struct AVFormatContext *s)
{
AVCodecParameters *par = s->streams[0]->codecpar;
- if (par->channels!=6 || par->sample_rate!=96000)
+ if (par->ch_layout.nb_channels != 6 || par->sample_rate != 96000)
return AVERROR(EINVAL);
return 0;
}