From patchwork Tue Sep 17 20:43:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Nicholson X-Patchwork-Id: 15121 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 1AA7D446293 for ; Tue, 17 Sep 2019 23:50:44 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E0EBC68839C; Tue, 17 Sep 2019 23:50:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5910D688321 for ; Tue, 17 Sep 2019 23:50:37 +0300 (EEST) Received: by mail-wm1-f44.google.com with SMTP id r195so29160wme.2 for ; Tue, 17 Sep 2019 13:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=55SUek3EXpPZl4tdEyfFM90or11XEZcMvsZWfxQqQGY=; b=TeggD6YXJOff0xvQFBR5eMdbxSuUis8bSsuOxyZIV/Jzq965cMlyzgWzyKSPJfKn0g ruDhvG8cOpZ9BgeksdLSIonWCsKAlAFb38aE7rFzVk7Iq/BKnNGUvfXGdqnaT/4hHrgq 7DV59keJennkiPbzBSJva7Shjgalat52dcEZOfuZtjPXUhrZFy4+l8zrjqumqDQ5dQvf Dr0lBsA9e6pXwswlPCy9jYQ60rl4WJr/YdH618evRCUYD6eE6NqS0dQN87xpJkAR1PTI qZeWpNTPJBBLBdxEC8d2zUe/JTb4/WDXKhKnBhi12vjY+ioSmAJLvy3AVgLa+03+P2sG Amlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=55SUek3EXpPZl4tdEyfFM90or11XEZcMvsZWfxQqQGY=; b=ZWj87SOg/P65PzHK3kprltnxOoOZHi5k0dyYyrAD9wOBk5xEIkN3ci9Kc3sYS+tWXD jBmTg0pfSyztbW0UTk1JQ8yyaj32tguYy3iyXWVjV4reEi0wR/Hr0alliPeJ3xx10W6f b9iWdOMfq0zu4nBle1PHa7IJTXwSyt4EJQFj2I+Kf/ozjbi4poTfFNoytJ4EHUwH7eKN 6hgXWM5qas0qVbQVPvTv2pjeuzLgUFy6M32eKZGNBUkA+P0EDcYZXRBRviNUE/3PWrFq zLqEYPqGTP5SPkDvygxLJqzeyaRPpN1muvJb8U98qCgomVRLxv8GeYtPtOsqvvdzqFJz RXtA== X-Gm-Message-State: APjAAAVFBJa8vLh23LkiiNq6POkBlQ7CWizIiFFiI+IfblQeB3gV95d/ aO6ul1T6o3+hlLyRfG0K60VNc6VPEjc= X-Google-Smtp-Source: APXvYqzYlSE2qcIerTM5OzHNOa6t/yoqWIszCVe/chgjgJ+9kDnJ5Yhem4yL6DY6tah8oFDoh1WG4g== X-Received: by 2002:a1c:a697:: with SMTP id p145mr18099wme.24.1568753035156; Tue, 17 Sep 2019 13:43:55 -0700 (PDT) Received: from Rosss-MacBook.localdomain ([89.101.86.58]) by smtp.gmail.com with ESMTPSA id v64sm7470wmf.12.2019.09.17.13.43.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Sep 2019 13:43:54 -0700 (PDT) From: phunkyfish To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Sep 2019 21:43:31 +0100 Message-Id: <20190917204331.8120-2-phunkyfish@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190917204331.8120-1-phunkyfish@gmail.com> References: <20190917204331.8120-1-phunkyfish@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/1] libavformat/rtsp: return error if rtsp_hd_out is null instead of crash 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 Cc: phunkyfish Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavformat/rtsp.c | 2 ++ 1 file changed, 2 insertions(+) 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))];