From ddcf84119141fffd233370837ddbc5bf5d68c87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 13 Oct 2010 08:15:39 +0000 Subject: rtpdec: Handle wrapping seq numbers in has_next_packet properly Originally committed as revision 25461 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtpdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/rtpdec.c') diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index c7fd3cf..f9ff972 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -574,7 +574,7 @@ static void enqueue_packet(RTPDemuxContext *s, uint8_t *buf, int len) static int has_next_packet(RTPDemuxContext *s) { - return s->queue && s->queue->seq == s->seq + 1; + return s->queue && s->queue->seq == (uint16_t) (s->seq + 1); } int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s) -- cgit v1.1