[Pkg-voip-commits] [janus] 145/163: Fix compilation issue with libavcodec < 55.28

Jonas Smedegaard dr at jones.dk
Sat Oct 28 01:22:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.2.5-1
in repository janus.

commit b6ada29c05ebf46a801903d4c6c605d873863569
Author: Alex <alex at meetecho.com>
Date:   Fri Oct 20 15:39:14 2017 +0200

    Fix compilation issue with libavcodec < 55.28
---
 postprocessing/pp-g722.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/postprocessing/pp-g722.c b/postprocessing/pp-g722.c
index b42f6f6..df3b54d 100644
--- a/postprocessing/pp-g722.c
+++ b/postprocessing/pp-g722.c
@@ -179,7 +179,11 @@ int janus_pp_g722_process(FILE *file, janus_pp_frame_packet *list, int *working)
 		avpacket.data = (uint8_t *)buffer;
 		avpacket.size = bytes;
 		int err = 0, got_frame = 0;
+#if LIBAVCODEC_VER_AT_LEAST(55,28)
 		AVFrame *frame = av_frame_alloc();
+#else
+		AVFrame *frame = avcodec_alloc_frame();
+#endif
 		err = avcodec_decode_audio4(dec_ctx, frame, &got_frame, &avpacket);
 		if(err < 0 || !got_frame) {
 			JANUS_LOG(LOG_ERR, "Error decoding audio frame... (%d)\n", err);
@@ -195,7 +199,11 @@ int janus_pp_g722_process(FILE *file, janus_pp_frame_packet *list, int *working)
 				fflush(wav_file);
 			}
 		}
+#if LIBAVCODEC_VER_AT_LEAST(55,28)
 		av_frame_free(&frame);
+#else
+		avcodec_free_frame(&frame);
+#endif
 		tmp = tmp->next;
 	}
 	g_free(buffer);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list