summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2011-07-24 09:13:11 +0000
committerBenny Prijono <bennylp@teluu.com>2011-07-24 09:13:11 +0000
commitafe1bd5bc2b105e83b5ce787d290a74f93371253 (patch)
tree51782bf80dcae28cef4b17fcd946bd20f2af4e65 /pjmedia
parentb48f44017f1fda64378c360cb0c20bb12af9543c (diff)
Fixed #1337 re: link error with the PLC stuff if G.711 codec is disabled.
This basically is caused by the problem with library order in the Makefile. Since libpjmedia (which contains the PLC code) is specified first before the third party libs (which the codecs reside), the PLC didn't get picked up by the linker. It works if G.711 is enabled, because G.711 lives in libpjmedia. The real problem is because there is a circular dependency between pjmedia and third party libraries. The real solution would be to break down third party libraries into individual lib and arrange the link order correctly. This would need a bit of work in the Makefile though. For now, let's just hack pjmedia-test so that it links with the PLC if G.711 is disabled. git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3681 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/src/test/test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pjmedia/src/test/test.c b/pjmedia/src/test/test.c
index ca53d732..a1f90530 100644
--- a/pjmedia/src/test/test.c
+++ b/pjmedia/src/test/test.c
@@ -43,6 +43,17 @@ void app_perror(pj_status_t status, const char *msg)
PJ_LOG(3,(THIS_FILE, "%s: %s", msg, errbuf));
}
+/* Force linking PLC stuff if G.711 is disabled. See:
+ * https://trac.pjsip.org/repos/ticket/1337
+ */
+#if PJMEDIA_HAS_G711_CODEC==0
+int dummy()
+{
+ // Dummy
+ return (int) &pjmedia_plc_save;
+}
+#endif
+
int test_main(void)
{
int rc = 0;