mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avformat/rtpdec: Fix negative missed packets in warning message
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
98cef1ebbe
commit
d9f05bea5c
@ -835,9 +835,14 @@ static int rtp_parse_queued_packet(RTPDemuxContext *s, AVPacket *pkt)
|
|||||||
if (s->queue_len <= 0)
|
if (s->queue_len <= 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!has_next_packet(s))
|
if (!has_next_packet(s)) {
|
||||||
|
int pkt_missed = s->queue->seq - s->seq - 1;
|
||||||
|
|
||||||
|
if (pkt_missed < 0)
|
||||||
|
pkt_missed += UINT16_MAX;
|
||||||
av_log(s->ic, AV_LOG_WARNING,
|
av_log(s->ic, AV_LOG_WARNING,
|
||||||
"RTP: missed %d packets\n", s->queue->seq - s->seq - 1);
|
"RTP: missed %d packets\n", pkt_missed);
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse the first packet in the queue, and dequeue it */
|
/* Parse the first packet in the queue, and dequeue it */
|
||||||
rv = rtp_parse_packet_internal(s, pkt, s->queue->buf, s->queue->len);
|
rv = rtp_parse_packet_internal(s, pkt, s->queue->buf, s->queue->len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user