Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

推流推一会儿,就不推了 #62

Open
LinMulberry opened this issue Jan 20, 2021 · 0 comments
Open

推流推一会儿,就不推了 #62

LinMulberry opened this issue Jan 20, 2021 · 0 comments

Comments

@LinMulberry
Copy link

日志显示
RESRTMP: start write
RESRTMP: write data type: 9, ts 354208
后面就没有成功或者失败的显示日志,感觉像是哪里阻塞了

拷贝了libresrtmp.c 如下 , 感觉这个LOGD("write data type: %d, ts %d", type, ts)之后 ,if (!ret)之前的一块哪里阻塞了
packet->m_nInfoField2 = ((RTMP*)rtmp)->m_stream_id;

LOGD("write data type: %d, ts %d", type, ts);

memcpy(packet->m_body,  buffer,  size);
packet->m_headerType = RTMP_PACKET_SIZE_LARGE;
packet->m_hasAbsTimestamp = FALSE;
packet->m_nTimeStamp = ts;
packet->m_packetType = type;
packet->m_nBodySize  = size;
int ret = RTMP_SendPacket((RTMP*)rtmp, packet, 0);
RTMPPacket_Free(packet);
free(packet);
(*env)->ReleaseByteArrayElements(env, data, buffer, 0);
if (!ret) {
	LOGD("end write error %d", sockerr);
	return sockerr;
}else
{
	LOGD("end write success");
	return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant