ref: 8753ff35378dfac05272c2a087fcd32da95e3d04
parent: 2ad189c0a88b07264a8af70e3343dfff8e9500d2
author: Giacomo Vacca <giacomo.vacca@gmail.com>
date: Sun Jan 15 15:32:07 EST 2017
opusrtp::extract() - use only if HAVE_PCAP Signed-off-by: Ralph Giles <giles@thaumas.net>
--- a/src/opusrtp.c
+++ b/src/opusrtp.c
@@ -952,7 +952,9 @@
{
int option, i;
const char *dest = "127.0.0.1";
+#ifdef HAVE_PCAP
const char *input_pcap = "input.pcap";
+#endif
int port = 1234;
struct option long_options[] = {
{"help", no_argument, NULL, 'h'},
@@ -992,10 +994,15 @@
dest = optarg;
break;
case 'e':
+#ifdef HAVE_PCAP
if (optarg)
input_pcap = optarg;
extract(input_pcap);
- break;
+ return 0;
+#else
+ fprintf(stderr, "pcap support disabled, sorry.\n");
+ return 1;
+#endif
case 'p':
if (optarg)
port = atoi(optarg);