update plugins/publish/publish_node.cpp
This commit is contained in:
parent
fc7ea39b67
commit
7195d2f85d
@ -387,6 +387,14 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ensure SPS/PPS (and VPS for H265) are emitted with IDR frames so RTSP clients can get SDP.
|
||||
if (coding_ == MPP_VIDEO_CodingAVC || coding_ == MPP_VIDEO_CodingHEVC) {
|
||||
MppEncHeaderMode header_mode = MPP_ENC_HEADER_MODE_EACH_IDR;
|
||||
if (mpi_->control(ctx_, MPP_ENC_SET_HEADER_MODE, &header_mode) != MPP_OK) {
|
||||
std::cerr << "[publish] MPP_ENC_SET_HEADER_MODE failed\n";
|
||||
}
|
||||
}
|
||||
|
||||
RK_S32 timeout = 2000;
|
||||
mpi_->control(ctx_, MPP_SET_OUTPUT_TIMEOUT, &timeout);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user