You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
basic: first RTP packets are lost in the BufferedReader #37
rtsp_connect() reads the RTSP responses through new BufferedReader(new InputStreamReader(s.getInputStream())), then passes the raw s.getInputStream() to tcp_stream(). Any bytes the reader has already buffered (up to 8 KiB, decoded as characters) are lost. These are usually the first interleaved RTP packets: SPS, PPS and the first IDR. The picture then starts only at the next key frame, and the stream has to resync on $.
The DESCRIBE response body (SDP) is also never read with Content-Length. Its lines are consumed by the loop that waits for the SETUP response, which only works by accident.
Fix: read the responses byte by byte from one InputStream, honour Content-Length, and pass the same stream to tcp_stream(). This is what RtspClient.readLine() / readRtspResponse() on v2 do.
Activity
compot-dev commentedon Oct 12, 2026
Fixed in #41 (merged into
basicas 6cf68b5). Not closed automatically becausebasicis not the default branch.