diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2011-03-13 00:42:27 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-03-15 08:09:19 -0400 |
commit | c76374c6db5f486672f9df223f43e4892bd655c9 (patch) | |
tree | 224beb5c4770ae0f10ffab26ec44f9bd1cc995e9 /libavformat/applehttpproto.c | |
parent | bafa4dd3e69531f262472ac286e0ae7d4dbfbd97 (diff) | |
download | ffmpeg-c76374c6db5f486672f9df223f43e4892bd655c9.tar.gz |
Use AVERROR_EXIT with url_interrupt_cb.
Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR(EINTR) was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be
restarted.
This fixes roundup issues 2657 and 2659 (ffplay not exiting for streamed
content).
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/applehttpproto.c')
-rw-r--r-- | libavformat/applehttpproto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/applehttpproto.c b/libavformat/applehttpproto.c index 83071300e8..871f2712df 100644 --- a/libavformat/applehttpproto.c +++ b/libavformat/applehttpproto.c @@ -318,7 +318,7 @@ retry: return AVERROR_EOF; while (av_gettime() - s->last_load_time < s->target_duration*1000000) { if (url_interrupt_cb()) - return AVERROR(EINTR); + return AVERROR_EXIT; usleep(100*1000); } goto retry; @@ -328,7 +328,7 @@ retry: ret = url_open(&s->seg_hd, url, URL_RDONLY); if (ret < 0) { if (url_interrupt_cb()) - return AVERROR(EINTR); + return AVERROR_EXIT; av_log(NULL, AV_LOG_WARNING, "Unable to open %s\n", url); s->cur_seq_no++; goto retry; |