[FFmpeg-cvslog] r14149 - trunk/libavformat/rtp_mpv.c
lucabe
subversion
Thu Jul 10 09:40:55 CEST 2008
Author: lucabe
Date: Thu Jul 10 09:40:54 2008
New Revision: 14149
Log:
Fix MPEG video packetization for RTP
Modified:
trunk/libavformat/rtp_mpv.c
Modified: trunk/libavformat/rtp_mpv.c
==============================================================================
--- trunk/libavformat/rtp_mpv.c (original)
+++ trunk/libavformat/rtp_mpv.c Thu Jul 10 09:40:54 2008
@@ -66,7 +66,7 @@ void ff_rtp_send_mpegvideo(AVFormatConte
begin_of_sequence = 1;
}
- if (r - buf1 < len) {
+ if (r - buf1 - 4 <= len) {
/* The current slice fits in the packet */
if (begin_of_slice == 0) {
/* no slice at the beginning of the packet... */
@@ -76,7 +76,7 @@ void ff_rtp_send_mpegvideo(AVFormatConte
}
r1 = r;
} else {
- if (r - r1 < max_packet_size - 4) {
+ if ((r1 - buf1 > 4) && (r - r1 < max_packet_size)) {
len = r1 - buf1 - 4;
end_of_slice = 1;
}
More information about the ffmpeg-cvslog
mailing list