diff options
author | Josh Allmann | 2010-08-29 10:25:16 +0000 |
---|---|---|
committer | Martin Storsjö | 2010-08-29 10:25:16 +0000 |
commit | b20359f51a1c3be5603be9908061b27f883f9467 (patch) | |
tree | da33f81dcf80d66304bda521c18494945ee12b0b /libavformat/rtpdec.c | |
parent | 682d28a965c859a8826c1b52c3437a6a0c4ab59f (diff) |
rtsp: Return AVERROR_EOF when all streams have received an RTCP BYE packet
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 24965 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r-- | libavformat/rtpdec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 25fe5a73f8..debc14c90b 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -92,11 +92,13 @@ static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf, int l buf += payload_len; len -= payload_len; break; + case RTCP_BYE: + return -RTCP_BYE; default: return -1; } } - return 0; + return -1; } #define RTP_SEQ_MOD (1<<16) @@ -451,8 +453,7 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, if ((buf[0] & 0xc0) != (RTP_VERSION << 6)) return -1; if (buf[1] >= RTCP_SR && buf[1] <= RTCP_APP) { - rtcp_parse_packet(s, buf, len); - return -1; + return rtcp_parse_packet(s, buf, len); } payload_type = buf[1] & 0x7f; if (buf[1] & 0x80) |