summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 5bdb7fa6a4..d07cd406ed 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1159,7 +1159,8 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
"?localport=%d", j);
/* we will use two ports per rtp stream (rtp and rtcp) */
j += 2;
- if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE) == 0)
+ if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback) == 0)
goto rtp_opened;
}
}
@@ -1306,7 +1307,8 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST);
ff_url_join(url, sizeof(url), "rtp", NULL, namebuf,
port, "?ttl=%d", ttl);
- if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE) < 0) {
+ if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback) < 0) {
err = AVERROR_INVALIDDATA;
goto fail;
}
@@ -1450,7 +1452,8 @@ redirect:
av_get_random_seed(), av_get_random_seed());
/* GET requests */
- if (ffurl_alloc(&rt->rtsp_hd, httpname, AVIO_FLAG_READ) < 0) {
+ if (ffurl_alloc(&rt->rtsp_hd, httpname, AVIO_FLAG_READ,
+ &s->interrupt_callback) < 0) {
err = AVERROR(EIO);
goto fail;
}
@@ -1471,7 +1474,8 @@ redirect:
}
/* POST requests */
- if (ffurl_alloc(&rt->rtsp_hd_out, httpname, AVIO_FLAG_WRITE) < 0 ) {
+ if (ffurl_alloc(&rt->rtsp_hd_out, httpname, AVIO_FLAG_WRITE,
+ &s->interrupt_callback) < 0 ) {
err = AVERROR(EIO);
goto fail;
}
@@ -1514,7 +1518,8 @@ redirect:
} else {
/* open the tcp connection */
ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, NULL);
- if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE) < 0) {
+ if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback) < 0) {
err = AVERROR(EIO);
goto fail;
}
@@ -1862,7 +1867,8 @@ static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap)
"?localport=%d&ttl=%d&connect=%d", rtsp_st->sdp_port,
rtsp_st->sdp_ttl,
rt->rtsp_flags & RTSP_FLAG_FILTER_SRC ? 1 : 0);
- if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE) < 0) {
+ if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback) < 0) {
err = AVERROR_INVALIDDATA;
goto fail;
}
@@ -1926,7 +1932,8 @@ static int rtp_read_header(AVFormatContext *s,
if (!ff_network_init())
return AVERROR(EIO);
- ret = ffurl_open(&in, s->filename, AVIO_FLAG_READ);
+ ret = ffurl_open(&in, s->filename, AVIO_FLAG_READ,
+ &s->interrupt_callback);
if (ret)
goto fail;