diff options
author | Martin Storsjö <martin@martin.st> | 2020-09-30 12:27:00 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-10-02 09:09:17 +0300 |
commit | 0b1d8468c4dca00e361186cce05a9683326593c3 (patch) | |
tree | a8ef04f98c6300910b70585bc0550f12db12c9f7 /libavcodec/atrac3plus.h | |
parent | 979cc0c7cbe29fe8821803fc4da0f9a1233a56e1 (diff) | |
download | ffmpeg-0b1d8468c4dca00e361186cce05a9683326593c3.tar.gz |
rtsp: Fix infinite loop in listen mode with UDP transport
In listen mode with UDP transport, once the sender has sent
the TEARDOWN and closed the connection, poll will indicate that
one can read from the connection (indicating that the socket has
reached EOF and should be closed by the receiver as well). In this
case, parse_rtsp_message won't try to parse the command (because
it's no longer in state STREAMING), but previously just returned
zero.
Prior to f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5, this caused
udp_read_packet to return zero, which is treated as EOF by
read_packet. But after that commit, udp_read_packet would continue
if parse_rtsp_message didn't return an explicit error code.
To keep the original behaviour from before that commit, more
explicitly return an error in parse_rtsp_message when in the wrong
state.
Fixes: #8840
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/atrac3plus.h')
0 files changed, 0 insertions, 0 deletions