summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorRoss Nicholson <phunkyfish@gmail.com>2019-09-19 16:12:33 +0100
committerAman Gupta <aman@tmm1.net>2019-09-27 10:54:28 -0700
commit460f74495fa93c4bb85503c5443580e2bb857efa (patch)
tree12c2f435b5de65d4d937d8be29d714d4119c64ff /libavformat/rtsp.c
parent0686651aab1de86cf25ec3c611fe82f9f5d7099c (diff)
libavformat/rtsp: return error if rtsp_hd_out is null instead of crash
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index c153cac88b..859defa592 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -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++;