diff options
author | Martin Storsjö | 2010-10-13 08:13:07 +0000 |
---|---|---|
committer | Martin Storsjö | 2010-10-13 08:13:07 +0000 |
commit | f6e138b4f4fbfb4caf50bcc628d48b6e4cdca269 (patch) | |
tree | 6325996f72f5c37711a3abfd5e664c83e2149010 /libavformat/rtpdec.c | |
parent | 4ffff36751d7ac47643f088306f7620bd16f391f (diff) |
rtpdec: Don't call the depacketizer to return more data unless it actually said it has more data
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
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r-- | libavformat/rtpdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 51583c081a..240229abfd 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -613,10 +613,10 @@ static int rtp_parse_one_packet(RTPDemuxContext *s, AVPacket *pkt, 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) { |