Make different errPacketTooShort for different packets?
There are many cheap camera vendors that are not following the rfc strictly. Some of errPacketTooShort errors are not so critical (depending of the packet type), but some are. And for now, there is no available mechanism to filter non critical packetlength issues because all of them returns the same errPacketTooShort.
For example, i have 20+ different cctv cams that are sending malformed SDES packet. SDES absolutely does not affect the streaming behavior/quality but floods logs with warnings. I dont want to completely disable error logging of errPacketTooShort, but want to ignore (filter) just this (SDES related) one...
Hello. This is a good idea, we can wrap errPacketTooShort for different type of packets, do you want to make the PR?
Yeah, will do it later. I'll also do a little research on all available "buggy" sources to determine an exact issue, so, maybe there also can be some types of a fallback to possibly discuss/implement.
Now there are approx 500 rtsp cctv cam sources in my installation with 20 "buggy" ones (its near 4%!). And SSTD length issue is the only common for all of these 20. Looks like few but popular cctv cam vendors are using the same incomplete RTSP server implementation.