Revision c76374c6

View differences:

libavformat/applehttp.c
528 528
        return AVERROR_EOF;
529 529
    while (av_gettime() - c->last_load_time < c->target_duration*1000000) {
530 530
        if (url_interrupt_cb())
531
            return AVERROR(EINTR);
531
            return AVERROR_EXIT;
532 532
        usleep(100*1000);
533 533
    }
534 534
    /* Enough time has elapsed since the last reload */
libavformat/applehttpproto.c
318 318
            return AVERROR_EOF;
319 319
        while (av_gettime() - s->last_load_time < s->target_duration*1000000) {
320 320
            if (url_interrupt_cb())
321
                return AVERROR(EINTR);
321
                return AVERROR_EXIT;
322 322
            usleep(100*1000);
323 323
        }
324 324
        goto retry;
......
328 328
    ret = url_open(&s->seg_hd, url, URL_RDONLY);
329 329
    if (ret < 0) {
330 330
        if (url_interrupt_cb())
331
            return AVERROR(EINTR);
331
            return AVERROR_EXIT;
332 332
        av_log(NULL, AV_LOG_WARNING, "Unable to open %s\n", url);
333 333
        s->cur_seq_no++;
334 334
        goto retry;
libavformat/avio.c
238 238
           fast_retries = FFMAX(fast_retries, 2);
239 239
        len += ret;
240 240
        if (url_interrupt_cb())
241
            return AVERROR(EINTR);
241
            return AVERROR_EXIT;
242 242
    }
243 243
    return len;
244 244
}
libavformat/avio.h
237 237

  
238 238
/**
239 239
 * The callback is called in blocking functions to test regulary if
240
 * asynchronous interruption is needed. AVERROR(EINTR) is returned
240
 * asynchronous interruption is needed. AVERROR_EXIT is returned
241 241
 * in this case by the interrupted function. 'NULL' means no interrupt
242 242
 * callback is given.
243 243
 */
libavformat/rtpproto.c
241 241
#else
242 242
    for(;;) {
243 243
        if (url_interrupt_cb())
244
            return AVERROR(EINTR);
244
            return AVERROR_EXIT;
245 245
        /* build fdset to listen to RTP and RTCP packets */
246 246
        n = poll(p, 2, 100);
247 247
        if (n > 0) {
libavformat/rtsp.c
1565 1565

  
1566 1566
    for (;;) {
1567 1567
        if (url_interrupt_cb())
1568
            return AVERROR(EINTR);
1568
            return AVERROR_EXIT;
1569 1569
        if (wait_end && wait_end - av_gettime() < 0)
1570 1570
            return AVERROR(EAGAIN);
1571 1571
        max_p = 0;
libavformat/tcp.c
73 73
    if (ret < 0) {
74 74
        struct pollfd p = {fd, POLLOUT, 0};
75 75
        if (ff_neterrno() == AVERROR(EINTR)) {
76
            if (url_interrupt_cb())
76
            if (url_interrupt_cb()) {
77
                ret = AVERROR_EXIT;
77 78
                goto fail1;
79
            }
78 80
            goto redo;
79 81
        }
80 82
        if (ff_neterrno() != AVERROR(EINPROGRESS) &&
......
84 86
        /* wait until we are connected or until abort */
85 87
        for(;;) {
86 88
            if (url_interrupt_cb()) {
87
                ret = AVERROR(EINTR);
89
                ret = AVERROR_EXIT;
88 90
                goto fail1;
89 91
            }
90 92
            ret = poll(&p, 1, 100);
libavformat/udp.c
452 452

  
453 453
    for(;;) {
454 454
        if (url_interrupt_cb())
455
            return AVERROR(EINTR);
455
            return AVERROR_EXIT;
456 456
        ret = poll(&p, 1, 100);
457 457
        if (ret < 0) {
458 458
            if (ff_neterrno() == AVERROR(EINTR))
libavformat/utils.c
2267 2267
    read_size = 0;
2268 2268
    for(;;) {
2269 2269
        if(url_interrupt_cb()){
2270
            ret= AVERROR(EINTR);
2270
            ret= AVERROR_EXIT;
2271 2271
            av_log(ic, AV_LOG_DEBUG, "interrupted\n");
2272 2272
            break;
2273 2273
        }

Also available in: Unified diff