diff mbox

[FFmpeg-devel,1/1] libavformat/rtsp: return error if rtsp_hd_out is null instead of crash

Message ID 20190917204331.8120-2-phunkyfish@gmail.com
State Superseded
Headers show

Commit Message

phunkyfish Sept. 17, 2019, 8:43 p.m. UTC
---
 libavformat/rtsp.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index c153cac88b..6de090b7ce 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1315,6 +1315,8 @@  static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
                                             int send_content_length)
 {
     RTSPState *rt = s->priv_data;
+    if (rt->rtsp_hd_out == NULL)
+        return ENOTCONN;
     char buf[4096], *out_buf;
     char base64buf[AV_BASE64_SIZE(sizeof(buf))];