rtpdec: Always check if we have the next packet queued
[ffmpeg.git] / libavformat / rtpdec.c
index ef51993c269e0af91c99314160857d8348da9636..25122398802feacdabc0aaa8fab4be4d198a4559 100644 (file)
@@ -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);
 }