diff options
author | Martin Storsjö <martin@martin.st> | 2010-10-13 08:13:53 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-10-13 08:13:53 +0000 |
commit | 91ec7aea206a7128a31e3e3d7f2c15c59e1c41d3 (patch) | |
tree | 007cecfd13dae4c583606750138538bf0ea1ae96 | |
parent | f6e138b4f4fbfb4caf50bcc628d48b6e4cdca269 (diff) | |
download | ffmpeg-91ec7aea206a7128a31e3e3d7f2c15c59e1c41d3.tar.gz |
rtpdec: Return AVERROR(EAGAIN) if out of data for mpegts, pass returned error codes through
Originally committed as revision 25459 to svn://svn.ffmpeg.org/ffmpeg/trunk
-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 240229abfd..ed2d0a47d2 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -472,7 +472,7 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt, /* specific MPEG2TS demux support */ ret = ff_mpegts_parse_packet(s->ts, pkt, buf, len); if (ret < 0) - return -1; + return ret; if (ret < len) { s->read_buf_size = len - ret; memcpy(s->buf, buf + ret, s->read_buf_size); @@ -630,11 +630,11 @@ static int rtp_parse_one_packet(RTPDemuxContext *s, AVPacket *pkt, } else { // TODO: Move to a dynamic packet handler (like above) if (s->read_buf_index >= s->read_buf_size) - return -1; + return AVERROR(EAGAIN); ret = ff_mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index, s->read_buf_size - s->read_buf_index); if (ret < 0) - return -1; + return ret; s->read_buf_index += ret; if (s->read_buf_index < s->read_buf_size) return 1; |