Skip to content

Commit 0127dcf

Browse files
committed
janus: hotfix: reverted sps/pps logic for first/last packages
1 parent aa58b1b commit 0127dcf

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

janus/src/rtpv.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool
106106
u8 *dg = rtpv->rtp->datagram;
107107

108108
// Set *_of_frame flags only for non-SPS/PPS packages
109+
/*
109110
# define CALL_FOR_SERVICE { \
110111
const bool m_fof = rtpv->rtp->first_of_frame; \
111112
const bool m_lof = rtpv->rtp->last_of_frame; \
@@ -115,18 +116,19 @@ void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool
115116
rtpv->rtp->first_of_frame = m_fof; \
116117
rtpv->rtp->last_of_frame = m_lof; \
117118
}
119+
*/
118120

119121
if (size + US_RTP_HEADER_SIZE <= US_RTP_TOTAL_SIZE) {
120122
us_rtp_write_header(rtpv->rtp, pts, marked);
121123
memcpy(dg + US_RTP_HEADER_SIZE, data, size);
122124
rtpv->rtp->used = size + US_RTP_HEADER_SIZE;
123-
if (type == 7 || type == 8) {
124-
CALL_FOR_SERVICE;
125-
} else {
125+
// if (type == 7 || type == 8) {
126+
// CALL_FOR_SERVICE;
127+
// } else {*/
126128
rtpv->rtp->last_of_frame = true;
127129
rtpv->callback(rtpv->rtp);
128130
rtpv->rtp->first_of_frame = false;
129-
}
131+
// }
130132
return;
131133
}
132134

@@ -158,13 +160,13 @@ void _rtpv_process_nalu(us_rtpv_s *rtpv, const u8 *data, uz size, u32 pts, bool
158160

159161
memcpy(dg + fu_overhead, src, frag_size);
160162
rtpv->rtp->used = fu_overhead + frag_size;
161-
if (type == 7 || type == 8) {
162-
CALL_FOR_SERVICE;
163-
} else {
163+
// if (type == 7 || type == 8) {
164+
// CALL_FOR_SERVICE;
165+
// } else {
164166
rtpv->rtp->last_of_frame = last;
165167
rtpv->callback(rtpv->rtp);
166168
rtpv->rtp->first_of_frame = false;
167-
}
169+
// }
168170

169171
src += frag_size;
170172
remaining -= frag_size;

0 commit comments

Comments
 (0)