You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
pafaudio: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
committed by
James Almer
parent
cc37640a72
commit
d2a360c139
@@ -29,12 +29,13 @@
|
|||||||
|
|
||||||
static av_cold int paf_audio_init(AVCodecContext *avctx)
|
static av_cold int paf_audio_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
if (avctx->channels != 2) {
|
if (avctx->ch_layout.nb_channels != 2) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n");
|
av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
|
av_channel_layout_uninit(&avctx->ch_layout);
|
||||||
|
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user