diff mbox series

[FFmpeg-devel,054/281] dv: convert to new channel layout API

Message ID 20220113015101.4-55-jamrial@gmail.com
State Accepted
Commit 590d9d6153209a441586c4ed9bfe1ab0d30775bc
Headers show
Series New channel layout API | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished

Commit Message

James Almer Jan. 13, 2022, 1:50 a.m. UTC
From: Vittorio Giovara <vittorio.giovara@gmail.com>

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/dv.c    | 3 +--
 libavformat/dvenc.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/dv.c b/libavformat/dv.c
index 77a6ede37b..1dadaf6e62 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -281,8 +281,7 @@  static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame)
             c->audio_pkt[i].pos          = -1;
         }
         c->ast[i]->codecpar->sample_rate    = dv_audio_frequency[freq];
-        c->ast[i]->codecpar->channels       = 2;
-        c->ast[i]->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
+        c->ast[i]->codecpar->ch_layout      = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
         c->ast[i]->codecpar->bit_rate       = 2 * dv_audio_frequency[freq] * 16;
         c->ast[i]->start_time            = 0;
     }
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index b76539b59f..6e5e6c6a36 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -329,7 +329,7 @@  static DVMuxContext* dv_init_mux(AVFormatContext* s)
             if (c->n_ast > 1) return NULL;
             /* Some checks -- DV format is very picky about its incoming streams */
             if(st->codecpar->codec_id    != AV_CODEC_ID_PCM_S16LE ||
-               st->codecpar->channels    != 2)
+               st->codecpar->ch_layout.nb_channels    != 2)
                 goto bail_out;
             if (st->codecpar->sample_rate != 48000 &&
                 st->codecpar->sample_rate != 44100 &&