[FFmpeg-devel] [PATCH] lavf/udp: warn in case the circular_buffer_size or overrun_nonfatal cannot be supported
Stefano Sabatini
stefasab at gmail.com
Wed Jul 18 18:45:46 CEST 2012
They are only supported if threading is available.
---
libavformat/udp.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 5b5c7cb..9358c86 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -496,6 +496,9 @@ static int udp_open(URLContext *h, const char *uri, int flags)
/* assume if no digits were found it is a request to enable it */
if (buf == endptr)
s->overrun_nonfatal = 1;
+ if (!HAVE_PTHREAD_CANCEL)
+ av_log(h, AV_LOG_WARNING,
+ "'overrun_nonfatal' option was set but is not supported on this system\n");
}
if (av_find_info_tag(buf, sizeof(buf), "ttl", p)) {
s->ttl = strtol(buf, NULL, 10);
@@ -514,6 +517,9 @@ static int udp_open(URLContext *h, const char *uri, int flags)
}
if (av_find_info_tag(buf, sizeof(buf), "fifo_size", p)) {
s->circular_buffer_size = strtol(buf, NULL, 10)*188;
+ if (!HAVE_PTHREAD_CANCEL)
+ av_log(h, AV_LOG_WARNING,
+ "'circular_buffer_size' option was set but is not supported on this system\n");
}
if (av_find_info_tag(buf, sizeof(buf), "localaddr", p)) {
av_strlcpy(localaddr, buf, sizeof(localaddr));
--
1.7.5.4
More information about the ffmpeg-devel
mailing list