diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-07-18 18:33:24 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-07-20 00:48:09 +0400 |
commit | a8d8e868c6154f63a9229f913434aaa21833e488 (patch) | |
tree | 5e9d7f1fb6d1d9ce41deab2a0017cce77c5b3e0b /libavformat/udp.c | |
parent | e1422940f2edcb2518cc9e7da2a8206f420511b1 (diff) |
lavf/udp: warn in case the circular_buffer_size or overrun_nonfatal options are not supported
They are only supported if pthread is available.
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r-- | libavformat/udp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index 5b5c7cb7df..b9aa7491a6 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -496,6 +496,10 @@ 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 it is not supported " + "on this build (pthread support is required)\n"); } if (av_find_info_tag(buf, sizeof(buf), "ttl", p)) { s->ttl = strtol(buf, NULL, 10); @@ -514,6 +518,10 @@ 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 it is not supported " + "on this build (pthread support is required)\n"); } if (av_find_info_tag(buf, sizeof(buf), "localaddr", p)) { av_strlcpy(localaddr, buf, sizeof(localaddr)); |