Mercurial > libavformat.hg
changeset 3557:1489d89efd77 libavformat
Fix MPEG video packetization for RTP
author | lucabe |
---|---|
date | Thu, 10 Jul 2008 07:40:54 +0000 |
parents | 5ad678c7e341 |
children | f615c35681cf |
files | rtp_mpv.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rtp_mpv.c Thu Jul 10 03:02:19 2008 +0000 +++ b/rtp_mpv.c Thu Jul 10 07:40:54 2008 +0000 @@ -66,7 +66,7 @@ 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 @@ } 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; }