Fix unexpected disconnection of rtsp session of rtspv2 #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
noVideosignal triggered in RTSPtoWeb, even though IDR-slice sentI'm using this vdk project in a media server(RTSPtoWeb) for a web platform at construction sites.
Few weeks ago, my client says that 352x240 resolution cameras are not visible(my React WebApp uses WebRTC Player).
I finally realized that I'm experiencing exactly the same problem as issue #116, but the root cause identified by the author of that issue is incorrect.
I fixed it and it worked well on my product. The reason is below,
RTP Payloads are neither AVCC nor AnnexB format. AVCC and AnnexB is for container format
in
handleVideoin format/rtspv2/demuxer.go,contentis RTP Packet andclient.offsetis 12 byte(RTP Hdr size).SplitNALUsassumes thatcontent[client.offset:client.end]is in either AVCC or AnnexB formatHowever, RTP Payloads are neither AVCC nor AnnexB format.
Because RTP payloads lack Emulation Prevention, SplitNALUs may incorrectly fragment what is actually a single, complete NAL unit.
so, in
handleH264Payload,it leads to
IsKeyFrameto befalseResolves #116