summaryrefslogtreecommitdiff
path: root/libavformat/rtpproto.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-13 23:43:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-14 00:33:39 +0100
commit5f268ca5c57f3ad3050b58f513651c17304d3653 (patch)
treef66ad7e5c4fd5656db9a95218f2ad433a982d81b /libavformat/rtpproto.c
parent4fa6e9d0b40653010b35278f7e8b556958341205 (diff)
parent32caa7b13cecca59213c73fa94dd683c2b003bfd (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavf: pass options from AVFormatContext to avio. avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards avio: add avio_open2, taking an interrupt callback and options avio: add support for passing options to protocols. avio: add and use ffurl_protocol_next(). avformat: Pass the interrupt callback on to chained muxers/demuxers avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc avformat: Use ff_check_interrupt avio: Add an internal utility function for checking the new interrupt callback avio: Add AVIOInterruptCB texi2html: remove stray \n doc: prettyfy the texi2html documentation swscale: handle unaligned buffers in yuv2plane1 Conflicts: libavformat/avformat.h libavformat/avio.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpproto.c')
-rw-r--r--libavformat/rtpproto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index 4f4cde621c..41fb7317bb 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -189,7 +189,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
build_udp_url(buf, sizeof(buf),
hostname, rtp_port, local_rtp_port, ttl, max_packet_size,
connect);
- if (ffurl_open(&s->rtp_hd, buf, flags) < 0)
+ if (ffurl_open(&s->rtp_hd, buf, flags, &h->interrupt_callback, NULL) < 0)
goto fail;
if (local_rtp_port>=0 && local_rtcp_port<0)
local_rtcp_port = ff_udp_get_local_port(s->rtp_hd) + 1;
@@ -197,7 +197,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
build_udp_url(buf, sizeof(buf),
hostname, rtcp_port, local_rtcp_port, ttl, max_packet_size,
connect);
- if (ffurl_open(&s->rtcp_hd, buf, flags) < 0)
+ if (ffurl_open(&s->rtcp_hd, buf, flags, &h->interrupt_callback, NULL) < 0)
goto fail;
/* just to ease handle access. XXX: need to suppress direct handle
@@ -227,7 +227,7 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size)
struct pollfd p[2] = {{s->rtp_fd, POLLIN, 0}, {s->rtcp_fd, POLLIN, 0}};
for(;;) {
- if (url_interrupt_cb())
+ if (ff_check_interrupt(&h->interrupt_callback))
return AVERROR_EXIT;
/* build fdset to listen to RTP and RTCP packets */
n = poll(p, 2, 100);