Skip to content

Commit

Permalink
rtpdec: Always check if we have the next packet queued
Browse files Browse the repository at this point in the history
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ö <[email protected]>
  • Loading branch information
mstorsjo committed May 11, 2016
1 parent 0c1d66a commit 9ea78fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/rtpdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9ea78fd

Please sign in to comment.