mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-14 19:25:01 +00:00
lavf/utils: remove loop on AVERROR(EAGAIN) in av_read_frame()
The loop was introduced in 64d340c62a
, and
was likely breaking non blocking reads as it busy loops.
This commit is contained in:
parent
fd63c2ff0c
commit
bbe9fe469a
@ -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 (;;) {
|
||||
|
Loading…
Reference in New Issue
Block a user