diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-13 23:43:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-14 00:33:39 +0100 |
commit | 5f268ca5c57f3ad3050b58f513651c17304d3653 (patch) | |
tree | f66ad7e5c4fd5656db9a95218f2ad433a982d81b /libavformat/applehttpproto.c | |
parent | 4fa6e9d0b40653010b35278f7e8b556958341205 (diff) | |
parent | 32caa7b13cecca59213c73fa94dd683c2b003bfd (diff) | |
download | ffmpeg-5f268ca5c57f3ad3050b58f513651c17304d3653.tar.gz |
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/applehttpproto.c')
-rw-r--r-- | libavformat/applehttpproto.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/applehttpproto.c b/libavformat/applehttpproto.c index bb5029d82f..8218c0e05f 100644 --- a/libavformat/applehttpproto.c +++ b/libavformat/applehttpproto.c @@ -114,7 +114,8 @@ static int parse_playlist(URLContext *h, const char *url) char line[1024]; const char *ptr; - if ((ret = avio_open(&in, url, AVIO_FLAG_READ)) < 0) + if ((ret = avio_open2(&in, url, AVIO_FLAG_READ, + &h->interrupt_callback, NULL)) < 0) return ret; read_chomp_line(in, line, sizeof(line)); @@ -266,7 +267,7 @@ retry: if (s->finished) return AVERROR_EOF; while (av_gettime() - s->last_load_time < s->target_duration*1000000) { - if (url_interrupt_cb()) + if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; usleep(100*1000); } @@ -274,9 +275,10 @@ retry: } url = s->segments[s->cur_seq_no - s->start_seq_no]->url, av_log(h, AV_LOG_DEBUG, "opening %s\n", url); - ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ); + ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ, + &h->interrupt_callback, NULL); if (ret < 0) { - if (url_interrupt_cb()) + if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; av_log(h, AV_LOG_WARNING, "Unable to open %s\n", url); s->cur_seq_no++; |