1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Description: Fix FTBFS with FFmpeg 7
Author: Zixing Liu <zixing.liu@canonical.com>
Forwarded: no
Last-Update: 2024-09-17
---
--- janus-1.1.2.orig/src/postprocessing/pp-avformat.c
+++ janus-1.1.2/src/postprocessing/pp-avformat.c
@@ -64,7 +64,7 @@ AVStream *janus_pp_new_audio_avstream(AV
c->codec_id = codec_id;
c->codec_type = AVMEDIA_TYPE_AUDIO;
c->sample_rate = samplerate;
- c->channels = channels;
+ av_channel_layout_default(&c->ch_layout, channels);
if(extradata) {
c->extradata_size = size;
c->extradata = av_memdup(extradata, size);
--- janus-1.1.2.orig/src/postprocessing/pp-g722.c
+++ janus-1.1.2/src/postprocessing/pp-g722.c
@@ -212,7 +212,7 @@ int janus_pp_g722_process(FILE *file, ja
int data_size = av_get_bytes_per_sample(dec_ctx->sample_fmt);
int i=0, ch=0;
for(i=0; i<frame->nb_samples; i++) {
- for(ch=0; ch<dec_ctx->channels; ch++) {
+ for(ch=0; ch<dec_ctx->ch_layout.nb_channels; ch++) {
fwrite(frame->data[ch] + data_size*i, 1, data_size, wav_file);
}
}
|