]> git.sesse.net Git - ffmpeg/commitdiff
libavformat/rtsp: return error if rtsp_hd_out is null instead of crash
authorRoss Nicholson <phunkyfish@gmail.com>
Thu, 19 Sep 2019 15:12:33 +0000 (16:12 +0100)
committerAman Gupta <aman@tmm1.net>
Fri, 27 Sep 2019 17:54:28 +0000 (10:54 -0700)
Signed-off-by: Aman Gupta <aman@tmm1.net>
libavformat/rtsp.c

index c153cac88b11523ed3043473131e6bace5e69ac9..859defa5925ab6b17b0fc956a22deea76d09862a 100644 (file)
@@ -1318,6 +1318,9 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
     char buf[4096], *out_buf;
     char base64buf[AV_BASE64_SIZE(sizeof(buf))];
 
+    if (!rt->rtsp_hd_out)
+        return ENOTCONN;
+
     /* Add in RTSP headers */
     out_buf = buf;
     rt->seq++;