It may have returned a negative number for an error (e.g. AVERROR(EAGAIN),
if more data is required for it to be able to return a complete packet).
Originally committed as revision 25458 to svn://svn.ffmpeg.org/ffmpeg/trunk
int rv= 0;
if (!buf) {
- /* If parsing of the previous packet actually returned 0, there's
- * nothing more to be parsed from that packet, but we may have
+ /* If parsing of the previous packet actually returned 0 or an error,
+ * there's nothing more to be parsed from that packet, but we may have
* indicated that we can return the next enqueued packet. */
- if (!s->prev_ret)
+ if (s->prev_ret <= 0)
return rtp_parse_queued_packet(s, pkt);
/* return the next packets, if any */
if(s->st && s->parse_packet) {