summaryrefslogtreecommitdiff
path: root/libavformat/librtmp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-23 17:45:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-23 17:45:35 +0100
commitd36e66bb2622d15e53d0a02a4685a8345cf93d7d (patch)
treef5a6b4bf8ff2bd22ea6e261323721b069c120d3a /libavformat/librtmp.c
parent8c8ee17e8d2800144116ec52f26a435a06b49420 (diff)
downloadffmpeg-d36e66bb2622d15e53d0a02a4685a8345cf93d7d.tar.gz
avformat/librtmp: Fix build with --disable-network --enable-librtmp
Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/librtmp.c')
-rw-r--r--libavformat/librtmp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index 40073f33ad..bfa9a718f1 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -28,7 +28,9 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
+#if CONFIG_NETWORK
#include "network.h"
+#endif
#include "url.h"
#include <librtmp/rtmp.h>
@@ -232,10 +234,12 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
goto fail;
}
+#if CONFIG_NETWORK
if (ctx->buffer_size >= 0 && (flags & AVIO_FLAG_WRITE)) {
int tmp = ctx->buffer_size;
setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp));
}
+#endif
s->is_streamed = 1;
return 0;
@@ -318,7 +322,9 @@ static const AVOption options[] = {
{"rtmp_swfurl", "URL of the SWF player. By default no value will be sent", OFFSET(swfurl), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC},
{"rtmp_swfverify", "URL to player swf file, compute hash/size automatically. (unimplemented)", OFFSET(swfverify), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC},
{"rtmp_tcurl", "URL of the target stream. Defaults to proto://host[:port]/app.", OFFSET(tcurl), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC|ENC},
+#if CONFIG_NETWORK
{"rtmp_buffer_size", "set buffer size in bytes", OFFSET(buffer_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, DEC|ENC },
+#endif
{ NULL },
};