mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-07 07:13:20 +00:00
Fix MPEG video packetization for RTP
Originally committed as revision 14149 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
bb68f8a2b6
commit
80150f7ee8
@ -66,7 +66,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
|
|||||||
begin_of_sequence = 1;
|
begin_of_sequence = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r - buf1 < len) {
|
if (r - buf1 - 4 <= len) {
|
||||||
/* The current slice fits in the packet */
|
/* The current slice fits in the packet */
|
||||||
if (begin_of_slice == 0) {
|
if (begin_of_slice == 0) {
|
||||||
/* no slice at the beginning of the packet... */
|
/* no slice at the beginning of the packet... */
|
||||||
@ -76,7 +76,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
|
|||||||
}
|
}
|
||||||
r1 = r;
|
r1 = r;
|
||||||
} else {
|
} else {
|
||||||
if (r - r1 < max_packet_size - 4) {
|
if ((r1 - buf1 > 4) && (r - r1 < max_packet_size)) {
|
||||||
len = r1 - buf1 - 4;
|
len = r1 - buf1 - 4;
|
||||||
end_of_slice = 1;
|
end_of_slice = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user