Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-09-24 22:38:14 +0400
committerStefano Sabatini <stefasab@gmail.com>2012-09-24 23:16:48 +0400
commitbbe9fe469a1c53e3a0029e98b3dc93a45ca450c8 (patch)
tree5bc56b9a9216feded2d750c07aa51a0dc5dd5ef0
parentfd63c2ff0c28abac654384f3b1060197b42f890d (diff)
lavf/utils: remove loop on AVERROR(EAGAIN) in av_read_frame()
The loop was introduced in 64d340c62ad5954c1a834df2d26057135e771774, and was likely breaking non blocking reads as it busy loops.
-rw-r--r--libavformat/utils.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4f3529aff4..2a8fac1e99 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1409,18 +1409,12 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
AVStream *st;
if (!genpts) {
- while (1) {
- ret = s->packet_buffer ?
- read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt) :
- read_frame_internal(s, pkt);
- if (ret < 0) {
- if (ret == AVERROR(EAGAIN))
- continue;
- else
- return ret;
- }
- goto return_packet;
- }
+ ret = s->packet_buffer ?
+ read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt) :
+ read_frame_internal(s, pkt);
+ if (ret < 0)
+ return ret;
+ goto return_packet;
}
for (;;) {