Bug#1081024: fix compilation of janus against ffmpeg 7

Nicola Ferralis feranick at hotmail.com
Sat Sep 7 02:59:00 BST 2024


Package: janus
Version: 1.1.2-1


The source code of janus is incompatible with the current version of FFmpeg 7, leading to a crash when trying to compile against it.
The attached patch fixes the issues, allowing successful compilation.

I am using Ubuntu 24.04 and Debian Unstable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-voip-maintainers/attachments/20240906/1ef0fd89/attachment.htm>
-------------- next part --------------
diff -Nru janus-gateway-1.1.2.orig/src/postprocessing/pp-avformat.c janus-gateway-1.1.2/src/postprocessing/pp-avformat.c
--- janus-gateway-1.1.2.orig/src/postprocessing/pp-avformat.c	2023-01-17 09:36:18
+++ janus-gateway-1.1.2/src/postprocessing/pp-avformat.c	2024-09-06 21:41:39
@@ -64,7 +64,7 @@
 	c->codec_id = codec_id;
 	c->codec_type = AVMEDIA_TYPE_AUDIO;
 	c->sample_rate = samplerate;
-	c->channels = channels;
+	c->ch_layout.nb_channels = channels;
 	if(extradata) {
 		c->extradata_size = size;
 		c->extradata = av_memdup(extradata, size);
diff -Nru janus-gateway-1.1.2.orig/src/postprocessing/pp-g722.c janus-gateway-1.1.2/src/postprocessing/pp-g722.c
--- janus-gateway-1.1.2.orig/src/postprocessing/pp-g722.c	2023-01-17 09:36:18
+++ janus-gateway-1.1.2/src/postprocessing/pp-g722.c	2024-09-06 21:31:22
@@ -212,7 +212,7 @@
 				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);
 					}
 				}


More information about the Pkg-voip-maintainers mailing list