From patchwork Fri Aug 21 09:41:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Pokotilo X-Patchwork-Id: 21791 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 C760244A554 for ; Fri, 21 Aug 2020 12:47:41 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A682568B6C2; Fri, 21 Aug 2020 12:47:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3987F68B4CF for ; Fri, 21 Aug 2020 12:47:35 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id p14so1233552wmg.1 for ; Fri, 21 Aug 2020 02:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wmspanel.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=Nq5OvHrFXLGLVtQqzg7ax0pCFz8LPmAiZ11qROz468g=; b=azsYWPeRfFSYQxt2yq5rpZUeNZb+fIRd4GlxLUtrAhqwdiUkg8xBQx6q5sQ9Ny7+KH vhekv8TOOpLqaNnBztF6/OiIdg9IRW2esVA8TE7/SQQfv4p8PqOAVk0zGXTeybXmoKYk 7Cc8iYH/EdbheXhp1BkxJT7gRzUE80QAdTQf8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Nq5OvHrFXLGLVtQqzg7ax0pCFz8LPmAiZ11qROz468g=; b=XGxE4Ow9fd+mcJqDqz1fADoopf3hP8CpmQqzfVStY+3ztb5KIf8Q+IGMON1Xda7oRw y7P9QvU9VKJw1vuWcFkcldwss9yEuAKaqFjlGMy6R0xywIYGayzmxez5MnylmRJygp0g 7OCuAZ5SfkoJ4gifIaF6fPBNG7W7NxnKEvwU/W233J1SAYhA07Mri6HkHZxICxfnCtan OeGS7uYpLKy5lFWgiuO+EcJLFlw5PQ2+JyNZjDfrDDNzLuoV41YXZsRePhPTU7RMiuDW Cx7n8A/n/9jFK+zfcVxxK1nxh6KXOdXpRpULUnWtlreOUcLp7LZ61BHhrYZbMMqkuoRB qpQA== X-Gm-Message-State: AOAM533/4aEVLnJZrDOBNB8V+wvRcA5ony1LuaUC2Pu3fvVkR5kZSg3Z ROJKLtyCc1II+WmM2fkTfX9iO9RrUP31TFpuSeJ/FpNkpYg= X-Google-Smtp-Source: ABdhPJyKyCCEUGrAm0p94CmDb7OnStLyDCjb2MLwgbsuCb7FoAXkKqP8kZub1ls41fd2mnMPpQJSW1BYu+8O3vevTJU= X-Received: by 2002:a1c:4409:: with SMTP id r9mr2182493wma.114.1598002911517; Fri, 21 Aug 2020 02:41:51 -0700 (PDT) MIME-Version: 1.0 From: Alex Pokotilo Date: Fri, 21 Aug 2020 19:41:15 +1000 Message-ID: To: ffmpeg-devel@ffmpeg.org, yyyaroslav@gmail.com X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] libavfilter/vf_overlay_cuda: Pass the main frame to the output if secondary frame is not available. now filter fails if secondary frame is not available due to e.g secondary source delay. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Subject: [PATCH] libavfilter/vf_overlay_cuda: Pass the main frame to the output if secondary frame is not available. now filter fails if secondary frame is not available due to e.g secondary source delay. --- libavfilter/vf_overlay_cuda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_overlay_cuda.c b/libavfilter/vf_overlay_cuda.c index 2f0f860e50..355cb39019 100644 --- a/libavfilter/vf_overlay_cuda.c +++ b/libavfilter/vf_overlay_cuda.c @@ -157,8 +157,8 @@ static int overlay_cuda_blend(FFFrameSync *fs) if (ret < 0) return ret; - if (!input_main || !input_overlay) - return AVERROR_BUG; + if (!input_overlay) + return ff_filter_frame(outlink, input_main); ret = av_frame_make_writable(input_main); if (ret < 0) {