big PES packets are assigned zero length to escape overflow

This commit is contained in:
Roman Arutyunyan 2013-03-25 00:29:20 +04:00
parent 0a8f0ee6c5
commit e5d2df6fc0

View file

@ -176,6 +176,9 @@ ngx_rtmp_mpegts_write_frame(ngx_file_t *file, ngx_rtmp_mpegts_frame_t *f,
}
pes_size = (b->last - b->pos) + header_size + 3;
if (pes_size > 0xffff) {
pes_size = 0;
}
*p++ = (pes_size >> 8);
*p++ = pes_size;