Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions src/rtsp/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ static inline int __retrieve_sprop(rtsp_handle h, unsigned char *buf, size_t len
nalptr = buf;
single_len = 0;
while (nal_split(buf, &nalptr, &single_len, len) == SUCCESS) {
if (nalptr[0] >> 1 & 0x3F == H265_NAL_TYPE_VPS) {
if ((nalptr[0] >> 1 & 0x3F) == H265_NAL_TYPE_VPS) {
ASSERT(single_len >= 4, return FAILURE);
ASSERT(base64 = mime_base64_create((char *)&(nalptr[0]), single_len), return FAILURE);

DASSERT(base64->base == 64, return FAILURE);
Expand Down Expand Up @@ -522,14 +523,10 @@ int rtp_send_h26x(rtsp_handle h, hal_vidstream *stream, char isH265)
for (int i = 0; i < stream->count; i++) {
unsigned char *data = stream->pack[i].data + stream->pack[i].offset;
size_t length = stream->pack[i].length - stream->pack[i].offset;
if (length >= 4 && data[0] == 0 && data[1] == 0 && data[2] == 0 && data[3] == 1) {
unsigned char *nalptr = data;
size_t single_len = 0;
while (nal_split(data, &nalptr, &single_len, length) == SUCCESS) {
ASSERT(__transfer_nal_h26x(&(trans.list_head), nalptr, single_len, h->isH265) == SUCCESS, goto error);
}
} else {
ASSERT(__transfer_nal_h26x(&(trans.list_head), data, length, h->isH265) == SUCCESS, goto error);
unsigned char *nalptr = data;
size_t single_len = 0;
while (nal_split(data, &nalptr, &single_len, length) == SUCCESS) {
ASSERT(__transfer_nal_h26x(&(trans.list_head), nalptr, single_len, h->isH265) == SUCCESS, goto error);
}
}
ASSERT(list_map_inline(&(trans.list_head), (__tcp_flush_each), NULL) == SUCCESS, goto error);
Expand Down
Loading