Browse code

rtpdec: Handle wrapping seq numbers in has_next_packet properly

Originally committed as revision 25461 to svn://svn.ffmpeg.org/ffmpeg/trunk

Martin Storsjö authored on 2010/10/13 17:15:39
Showing 1 changed files
... ...
@@ -574,7 +574,7 @@ static void enqueue_packet(RTPDemuxContext *s, uint8_t *buf, int len)
574 574
 
575 575
 static int has_next_packet(RTPDemuxContext *s)
576 576
 {
577
-    return s->queue && s->queue->seq == s->seq + 1;
577
+    return s->queue && s->queue->seq == (uint16_t) (s->seq + 1);
578 578
 }
579 579
 
580 580
 int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s)