From patchwork Wed Dec 11 12:21:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 16736 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 1D96E449C2C for ; Wed, 11 Dec 2019 14:21:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F09F868AC76; Wed, 11 Dec 2019 14:21:31 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6441568AC76 for ; Wed, 11 Dec 2019 14:21:25 +0200 (EET) Received: by mail-lf1-f68.google.com with SMTP id i23so4065129lfo.7 for ; Wed, 11 Dec 2019 04:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=i1DXhhXWAlug+D5+Nw/41gkKWMbKXlnVet7NW2wYBLU=; b=W3x0qZCYgCGzumBdX+ti8ngRzYlzUGReDsCTVYuVfSXZUjjbMvHP0wsQiKbPfiJMoT UF9KnQp+zf7uzecoxIbBr/0F8HG/5SmtyemvyxEL9snIE7Lv562xgEj4zpRDOv+GI2x6 h8zwrMrIL6xKtqjysxqHEszPtkKmSDdCGFaqQKdX7Hkb3JCS19AFOOSfPOsYPfJgDILo IaX94iSw846z5WfOt+q7BI6qmjLFJ4Jmt3qtmh9ulUqVRhqF0rpNiQuoESCMJ6/ZCbWL c2C5SVlUkO241Z4Fw6VbHwqWcb3Hy1eKiut1zkf5NngOtMetObeBVkk1QH5FJvUoMjVh JLMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=i1DXhhXWAlug+D5+Nw/41gkKWMbKXlnVet7NW2wYBLU=; b=ZIwRmaofpdo13PMFNoRXHMFchbu1Kzss5BtlEHQMihchgOmsB5BPOG14yBu7adS02K IOf6TvusZJbqCjaI/lAzM6VDJc6G/Ev+/wJyPuzXWxJZWLtzGLr3FFUdVVrfXxOANZud 8S857XASRt2OG+82oBGU6jt4DEv46kyCwA9t2UVh9AMzF6ROVhMRDnlqN/lfJPIAIiIY OjXm/41vLivtmLO9MyF5cIcg8Id97UIo0hjhN7DFoDxvYQDFuJfwW/aO5ecSYtCX+H1b 42iJW9R+glrc5AxWJe3xSiCr0SpQWWu+yyRcsc/nRgYAmCGgLKmyqE+acMYYXOMUYeM3 oMTQ== X-Gm-Message-State: APjAAAX6/nuk8aLqbIAbzYH45vY2z9iMPHRh2l3gUT3y0qyBaFFTi25U P1K+g/Bl0NfDwv6CsuasHtXWoz1Vnpk= X-Google-Smtp-Source: APXvYqy+VCqj1t/SZKF2fC4eeA6TwP+GfrVpsCrxmYqkrMv4c6DTDH/h1lsAmKArh7tAY8VQCgjfVw== X-Received: by 2002:a19:888:: with SMTP id 130mr2010693lfi.167.1576066884603; Wed, 11 Dec 2019 04:21:24 -0800 (PST) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id n3sm1060519lfk.61.2019.12.11.04.21.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 04:21:24 -0800 (PST) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 Dec 2019 14:21:22 +0200 Message-Id: <20191211122123.31156-1-martin@martin.st> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 1/2] rtsp: Use AVERROR() with errno.h error codes for error returns X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" For this particular function, it's only required to return nonzero, but use the common AVERROR() pattern for consistency. --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 859defa592..cd6fc32a29 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -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;