diff options
author | Martin Storsjö <martin@martin.st> | 2013-01-14 17:48:26 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2016-05-11 10:35:01 +0300 |
commit | 9ea78fd00a49f0691c1a5134eb59d4e5bb380a2a (patch) | |
tree | 2c4ebcbeea33dceba8df499c3fdc8ab8de0668fc | |
parent | 0c1d66a07917602303f129f5a5651faeec2415d5 (diff) | |
download | ffmpeg-9ea78fd00a49f0691c1a5134eb59d4e5bb380a2a.tar.gz |
rtpdec: Always check if we have the next packet queued
It doesn't matter what the actual reason for not returning
an AVPacket was - if we didn't return any packet and we have
the next one queued, parse it immediately. (rtp_parse_queued_packet
always consumes a queued packet if one exists, so there's no risk
for infinite loops.)
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/rtpdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index ef51993c26..2512239880 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -837,7 +837,7 @@ int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, return -1; rv = rtp_parse_one_packet(s, pkt, bufptr, len); s->prev_ret = rv; - while (rv == AVERROR(EAGAIN) && has_next_packet(s)) + while (rv < 0 && has_next_packet(s)) rv = rtp_parse_queued_packet(s, pkt); return rv ? rv : has_next_packet(s); } |