rtsp: Use AVERROR() with errno.h error codes for error returns
authorMartin Storsjö <martin@martin.st>
Wed, 11 Dec 2019 12:13:21 +0000 (14:13 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 12 Dec 2019 09:28:31 +0000 (11:28 +0200)
This particular function is only required to return nonzero on
errors, but use the common AVERROR() pattern for consistency.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtsp.c

index 859defa..cd6fc32 100644 (file)
@@ -1319,7 +1319,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
     char base64buf[AV_BASE64_SIZE(sizeof(buf))];
 
     if (!rt->rtsp_hd_out)
-        return ENOTCONN;
+        return AVERROR(ENOTCONN);
 
     /* Add in RTSP headers */
     out_buf = buf;