From e9174641556b3ca38c56b9621e855cf636cdf12f Mon Sep 17 00:00:00 2001 From: Luca Abeni Date: Thu, 19 Jun 2008 10:31:45 +0000 Subject: [PATCH] Fix neverending loop which might happen when sending high-bitrate MPEG2 video over RTP Originally committed as revision 13813 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtp_mpv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtp_mpv.c b/libavformat/rtp_mpv.c index d42f2e770c..061eb35192 100644 --- a/libavformat/rtp_mpv.c +++ b/libavformat/rtp_mpv.c @@ -76,7 +76,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size) } r1 = r; } else { - if (r - r1 < max_packet_size) { + if (r - r1 < max_packet_size - 4) { len = r1 - buf1 - 4; end_of_slice = 1; }