[FFmpeg-cvslog] In retry_transfer_wrapper, do not check url_interrupt_cb, causes problems
Baptiste Coudurier
git
Tue Mar 8 02:43:30 CET 2011
ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Fri Mar 4 23:43:02 2011 +0100| [aa612fbb99f6246913a789afde5a26f70c5a9159] | committer: Michael Niedermayer
In retry_transfer_wrapper, do not check url_interrupt_cb, causes problems
when writing and pressing q during encoding. Instead, check url_interrupt_cb
at the end.
Note that when a protocol is interrupted by url_interrupt_cb, some data may
be silently discarded: the protocol context is not suitable for anything
anymore.
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit 688c22e033a48ebf84fb4b52642bbd40f11e9c4e)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa612fbb99f6246913a789afde5a26f70c5a9159
---
libavformat/avio.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 49031a5..2265549 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -237,6 +237,8 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
if (ret)
fast_retries = FFMAX(fast_retries, 2);
len += ret;
+ if (url_interrupt_cb())
+ return AVERROR(EINTR);
}
return len;
}
More information about the ffmpeg-cvslog
mailing list