diff options
author | Zhao Zhili <quinkblack@foxmail.com> | 2020-09-27 19:50:27 +0800 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-10-02 09:11:24 +0300 |
commit | a191d4166f8fafaf415ebc489ebbc8f6d8d174fe (patch) | |
tree | 04c52a2ff2f87966b90fafff238905619586b672 /libavformat/rtsp.c | |
parent | 0b1d8468c4dca00e361186cce05a9683326593c3 (diff) | |
download | ffmpeg-a191d4166f8fafaf415ebc489ebbc8f6d8d174fe.tar.gz |
avformat/rtsp: fix parse_rtsp_message
1. Remove the assumption that the message method is TEARDOWN.
2. Don't ignore the error code of ff_rtsp_parse_streaming_commands.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ad12f2ae98..2ce09477ed 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1964,11 +1964,7 @@ static int parse_rtsp_message(AVFormatContext *s) if (rt->rtsp_flags & RTSP_FLAG_LISTEN) { if (rt->state == RTSP_STATE_STREAMING) { - if (!ff_rtsp_parse_streaming_commands(s)) - return AVERROR_EOF; - else - av_log(s, AV_LOG_WARNING, - "Unable to answer to TEARDOWN\n"); + return ff_rtsp_parse_streaming_commands(s); } else return AVERROR_EOF; } else { |