From patchwork Tue Sep 26 16:06:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 5296 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.36.26 with SMTP id f26csp4002571jaa; Tue, 26 Sep 2017 09:07:28 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD4dSFTut0XzQtVHsvjkVgWnyDVYM/AHgrvRTgMMdPLElsFJnT3FGfLEEXiYYPrwSsYveUL X-Received: by 10.28.170.76 with SMTP id t73mr3292629wme.118.1506442048578; Tue, 26 Sep 2017 09:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506442048; cv=none; d=google.com; s=arc-20160816; b=jW5qMl1VH/0fcIdtKzwtX9sVIOxiCisPqJvbkwKjhlNVrRxQvQm4+69qUYtPu5ibx/ ibq66jxABJmUshaaq2UIJPycS3WQ4qzgRBkQWZhZHHVE9+TiwQUhFa6ylhuJtokksL9r VpmdGEaY5BTiYYZhxq3oYT2LOTxK7F6eEB/AWAoGVsxgm5kQODeFCkstmyDybOIu8o82 HvwNieGxGni6Bel5tO0e8spXjC757+PKRbZJGwmaJ1eRgkF97LWllgGHPlHIP8zYJ6uU M4Ycx25g/1xltGLzhAM8aEuGlXU3MnVJ+afgZD2pLtDvRN5uo8ziGE55WNrkF6ftdffy 5gTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=ny2hkxyNF+APr9ZMxr2Zd49qC0YnHzGu0yXYZpcX7j0=; b=YFFO9M1DSwRnuLXnZIu0opF2/rCg3jp1uHJFxYIJ/yZX9yqpee7+OQUXXyDMKtpc42 YhI9KasbqCytdGwWqreaGq2Cckoy3jgVv5g5JHmLW7MFqza8KCdVQVDPy2/R3tCPLfGB 01w9Rr1fMxuxYwfQOMkkAudG7tMEDsr3bIDC4O7f8J5U7F1im9HVjnV6LDA8F+nerkEg /P+7foiamXS1XJPWoV7WOvZEYB6Uwnl1fTzljUdbHzP6c1e6QN7LM5y9eJ/BOE8iU4Ne Md4VsY6LBbxjLotYOuN1MFABqkXhKka2/cc5mMkXCgRW04m/5VNMym4WtI0Wjxsv2c08 fWAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n72si1909756wmd.32.2017.09.26.09.07.28; Tue, 26 Sep 2017 09:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 19A72689200; Tue, 26 Sep 2017 19:06:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from was-smtp1.livetimenet.net (50-206-97-56-static.hfc.comcastbusiness.net [50.206.97.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9848A6883B2 for ; Tue, 26 Sep 2017 19:06:37 +0300 (EEST) Received: by was-smtp1.livetimenet.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.84_2) (envelope-from ) id 1dwsNk-00055P-4S; Tue, 26 Sep 2017 12:06:48 -0400 From: Devin Heitmueller To: ffmpeg-devel@ffmpeg.org Date: Tue, 26 Sep 2017 12:06:23 -0400 Message-Id: <20170926160623.1257-5-dheitmueller@ltnglobal.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170926160623.1257-1-dheitmueller@ltnglobal.com> References: <20170926160623.1257-1-dheitmueller@ltnglobal.com> X-Spam-Score: -1.9 (-) Subject: [FFmpeg-devel] [PATCH 4/4] livavdevice/decklink: Don't allow any codecs but V210 and UYVY422 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: Devin Heitmueller MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Make sure that codecs other than V210 or wrapped avframes with uyvy422 video are passed to decklink output (which would result in undefined behavior). Signed-off-by: Devin Heitmueller --- libavdevice/decklink_enc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 0d965699ec..8f08ded933 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -159,6 +159,10 @@ static int decklink_setup_video(AVFormatContext *avctx, AVStream *st) " Only AV_PIX_FMT_UYVY422 is supported.\n"); return -1; } + } else if (c->codec_id != AV_CODEC_ID_V210) { + av_log(avctx, AV_LOG_ERROR, "Unsupported codec type!" + " Only V210 and wrapped frame with AV_PIX_FMT_UYVY422 are supported.\n"); + return -1; } if (ff_decklink_set_format(avctx, c->width, c->height,