]> git.sesse.net Git - ffmpeg/commitdiff
avformat/rtsp: fix parse_rtsp_message
authorZhao Zhili <quinkblack@foxmail.com>
Sun, 27 Sep 2020 11:50:27 +0000 (19:50 +0800)
committerMartin Storsjö <martin@martin.st>
Fri, 2 Oct 2020 06:11:24 +0000 (09:11 +0300)
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>
libavformat/rtsp.c

index ad12f2ae98ef6010c785fc0ea1ef6a2dcefda5f8..2ce09477edd6da0da7b0cb26a5c71b61413b40b0 100644 (file)
@@ -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 {