diff options
author | Martin Storsjö <martin@martin.st> | 2011-11-06 22:34:24 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-11-13 13:08:13 +0100 |
commit | 9957cdbfd5ced5baae6ec97b97b08f1ad42aa4e4 (patch) | |
tree | 3bb6c32c1443eda97524dbea69b60416a3bdc019 /libavformat/applehttp.c | |
parent | c4a090ddb564b87fd9d6d4f83e0f134a77c96007 (diff) | |
download | ffmpeg-9957cdbfd5ced5baae6ec97b97b08f1ad42aa4e4.tar.gz |
avformat: Use ff_check_interrupt
Diffstat (limited to 'libavformat/applehttp.c')
-rw-r--r-- | libavformat/applehttp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c index eadb230045..06884a07c6 100644 --- a/libavformat/applehttp.c +++ b/libavformat/applehttp.c @@ -99,6 +99,7 @@ typedef struct AppleHTTPContext { int cur_seq_no; int end_of_segment; int first_packet; + AVIOInterruptCB *interrupt_callback; } AppleHTTPContext; static int read_chomp_line(AVIOContext *s, char *buf, int maxlen) @@ -388,7 +389,7 @@ reload: return AVERROR_EOF; while (av_gettime() - v->last_load_time < v->target_duration*1000000) { - if (url_interrupt_cb()) + if (ff_check_interrupt(c->interrupt_callback)) return AVERROR_EXIT; usleep(100*1000); } @@ -433,6 +434,8 @@ static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap) AppleHTTPContext *c = s->priv_data; int ret = 0, i, j, stream_offset = 0; + c->interrupt_callback = &s->interrupt_callback; + if ((ret = parse_playlist(c, s->filename, NULL, s->pb)) < 0) goto fail; |