summaryrefslogtreecommitdiff
path: root/libavformat/applehttp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-11-06 22:50:44 +0200
committerAnton Khirnov <anton@khirnov.net>2011-11-13 13:12:17 +0100
commit6f1b7b39449c4cd58e37d831d5d97bfd25eb26f0 (patch)
treeb97fb7b744d0d6d1d3611465b055dd10c17d8ebc /libavformat/applehttp.c
parent9957cdbfd5ced5baae6ec97b97b08f1ad42aa4e4 (diff)
avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc
Change all uses of these function to pass the relevant callback on.
Diffstat (limited to 'libavformat/applehttp.c')
-rw-r--r--libavformat/applehttp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 06884a07c6..ae251531e8 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -323,13 +323,15 @@ static int open_input(struct variant *var)
{
struct segment *seg = var->segments[var->cur_seq_no - var->start_seq_no];
if (seg->key_type == KEY_NONE) {
- return ffurl_open(&var->input, seg->url, AVIO_FLAG_READ);
+ return ffurl_open(&var->input, seg->url, AVIO_FLAG_READ,
+ &var->parent->interrupt_callback);
} else if (seg->key_type == KEY_AES_128) {
char iv[33], key[33], url[MAX_URL_SIZE];
int ret;
if (strcmp(seg->key, var->key_url)) {
URLContext *uc;
- if (ffurl_open(&uc, seg->key, AVIO_FLAG_READ) == 0) {
+ if (ffurl_open(&uc, seg->key, AVIO_FLAG_READ,
+ &var->parent->interrupt_callback) == 0) {
if (ffurl_read_complete(uc, var->key, sizeof(var->key))
!= sizeof(var->key)) {
av_log(NULL, AV_LOG_ERROR, "Unable to read key file %s\n",
@@ -349,7 +351,8 @@ static int open_input(struct variant *var)
snprintf(url, sizeof(url), "crypto+%s", seg->url);
else
snprintf(url, sizeof(url), "crypto:%s", seg->url);
- if ((ret = ffurl_alloc(&var->input, url, AVIO_FLAG_READ)) < 0)
+ if ((ret = ffurl_alloc(&var->input, url, AVIO_FLAG_READ,
+ &var->parent->interrupt_callback)) < 0)
return ret;
av_opt_set(var->input->priv_data, "key", key, 0);
av_opt_set(var->input->priv_data, "iv", iv, 0);