summaryrefslogtreecommitdiff
path: root/libavformat/sapdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/sapdec.c')
-rw-r--r--libavformat/sapdec.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c
index e3cdcea6a6..42507d34f1 100644
--- a/libavformat/sapdec.c
+++ b/libavformat/sapdec.c
@@ -26,6 +26,7 @@
#include "os_support.h"
#include "internal.h"
#include "avio_internal.h"
+#include "url.h"
#if HAVE_POLL_H
#include <poll.h>
#endif
@@ -53,7 +54,7 @@ static int sap_read_close(AVFormatContext *s)
if (sap->sdp_ctx)
av_close_input_stream(sap->sdp_ctx);
if (sap->ann_fd)
- url_close(sap->ann_fd);
+ ffurl_close(sap->ann_fd);
av_freep(&sap->sdp);
ff_network_close();
return 0;
@@ -84,7 +85,7 @@ static int sap_read_header(AVFormatContext *s,
ff_url_join(url, sizeof(url), "udp", NULL, host, port, "?localport=%d",
port);
- ret = url_open(&sap->ann_fd, url, URL_RDONLY);
+ ret = ffurl_open(&sap->ann_fd, url, URL_RDONLY);
if (ret)
goto fail;
@@ -92,7 +93,7 @@ static int sap_read_header(AVFormatContext *s,
int addr_type, auth_len;
int pos;
- ret = url_read(sap->ann_fd, recvbuf, sizeof(recvbuf) - 1);
+ ret = ffurl_read(sap->ann_fd, recvbuf, sizeof(recvbuf) - 1);
if (ret == AVERROR(EAGAIN))
continue;
if (ret < 0)
@@ -182,7 +183,7 @@ fail:
static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
{
struct SAPState *sap = s->priv_data;
- int fd = url_get_file_handle(sap->ann_fd);
+ int fd = ffurl_get_file_handle(sap->ann_fd);
int n, ret;
struct pollfd p = {fd, POLLIN, 0};
uint8_t recvbuf[1500];
@@ -194,7 +195,7 @@ static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
n = poll(&p, 1, 0);
if (n <= 0 || !(p.revents & POLLIN))
break;
- ret = url_read(sap->ann_fd, recvbuf, sizeof(recvbuf));
+ ret = ffurl_read(sap->ann_fd, recvbuf, sizeof(recvbuf));
if (ret >= 8) {
uint16_t hash = AV_RB16(&recvbuf[2]);
/* Should ideally check the source IP address, too */