From patchwork Fri Oct 27 12:38:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 44381 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bf16:b0:15d:8365:d4b8 with SMTP id gc22csp1332504pzb; Fri, 27 Oct 2023 05:30:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFM3Eqmmpt1n3i1fAKSkUqDM9cuwybBMexfgurymBfeBvM10uYE6Q1Rua2BhGj+UyJ9DJHs X-Received: by 2002:a17:906:da87:b0:9c7:5db4:c943 with SMTP id xh7-20020a170906da8700b009c75db4c943mr2361796ejb.40.1698409849950; Fri, 27 Oct 2023 05:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698409849; cv=none; d=google.com; s=arc-20160816; b=MBFlDdGIqL2VbNy1UeVCpEAI+DSUIKi1E3KBTEfwgQpQqrg8F2/qhw4ULotYl49VD4 /6vpylv2YKEGhmAJCE4bJ+VsUX5pLTjs8wKlynSlZpl+wuLCa4lejjKzIY9Ze6hY7U3z gyoEIP+j0vTi9Qv7gHctlCCbV2BUPtrip6qIJ+4grwTrjeyUnPjYdapaUVSLlYfGBTBC jbn16UzH0GVRXwwZNS/NzljfWB7U/wQVQSwL4t0IkIV+03A6Zs57MDxP7bskINrsth2+ M9N97faY2qPuAKPqndJIYQJEqilbO+31kIIr0L/uLsIV27BO5HSijdUq6pPNYA1jMuMr l74w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to; bh=3NFbk6l40iUfX4clte+M62wB3q7N+kdZYgUrEp3/w0k=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=voNfqed+gO1HomX4Bcn9OS2T4/UE0C4je+T85WJNZClzYCgRqwjcypa/JVl0XItEuT H2xzEChv2Y6QO4tdlR4u3q2zm93jF/KP/RnwIVOk3OX1Dfy8FuT6cH3flwc9VPdxDM3L Lx8JvRJZdnPhdxqEOt+WeGraKUggQHc5Gz/uf24zh7OveFqvitljgZINXsRhYqRqD7Jg 1SFSh9BHqlSJZotv69cY4Z+mBeJB3Pb5JqfTS9EdRpag7d9J1aHPoVkC2bmLtFEFjuI3 lEh4FgTbK5ucKBT3kLVK9HmTNMmVDxG/RTL74XROt4k6S+lG+619xhNjcSzgQaNVpWCp +qRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=M6CuI07E; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id wy8-20020a170906fe0800b0099bc7292ed0si785894ejb.806.2023.10.27.05.30.47; Fri, 27 Oct 2023 05:30:49 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=M6CuI07E; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8EF9A68CB33; Fri, 27 Oct 2023 15:30:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3328868C6BE for ; Fri, 27 Oct 2023 15:30:38 +0300 (EEST) Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-7b625ed7208so911360241.1 for ; Fri, 27 Oct 2023 05:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698409837; x=1699014637; darn=ffmpeg.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5GsGgrJPruOO96QK2uB0dD459uh+dR2BGSB6YDddW+E=; b=M6CuI07EoJ35FjxNI16m5eiKJ4JQQu4ASz93UHxydcpf8GJWoDkXabPomlsnX2WLTS WPTlrVPAXrXdSKWsdJgfy/vwh9QEL50X6vyF5GPAkgPTKnMnNQ3Rbqm3g7SSHZj+uo1D ookUAwiI0ZfqIN7N6o7suSCHr7s/JADa8WqBElJluWmalpLt/Df8uRmIBvos64xWSArs edYAgm7ZxLcjlsMbi1BiaF/BNZQCVYY2AT4Bs/ZYGpG6i99fvHmkt7C/k8oX5l6vDkXG PNkuacKfjxlNcekFqOFlARY2u/131YPr4k4Ouoej0VnC/s2H20c7txFRsHQl9WYA4F6K Lk9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698409837; x=1699014637; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5GsGgrJPruOO96QK2uB0dD459uh+dR2BGSB6YDddW+E=; b=tDJom7YTzrA/86Px2dngFegivoSm5af6ju7mu7kjCMZORA4pdrtubiHImCBnL9eYsK nVkDn0yq4BAaBWfHtzJDA4BI72MT/W39SQVVoRxTSpm1Z/7tPLsQJPiS0btv0FLyUIDj Xw/aRd/HVDmGU7fYAnVV/pPKe2oJgaMgQnvvgHVPeeC6PuH3f1roR8a2865MeYjGavsA FBCcGYgsGE+3OnUpGgqbrvwONpENF4rEQRCu52n6hrvlo+xXACrj49g8w56GH9z+HGIL oocnJzd5mwjP1wC6MZfUZ+mk8caEC8tLizY0O8JuSW11qkrWzOhrILVqNqVszMo7FTC0 oHxQ== X-Gm-Message-State: AOJu0YxRgorJLoRVjE9oLzfvg0kePkmFa465mksU9dOI80vWXhLu+8vN CbYVwTu7eKkvYFTgmbr4Zc3PlzwfsrCZT4euHQgUiJHfgtM= X-Received: by 2002:a67:c087:0:b0:458:45c5:aaf6 with SMTP id x7-20020a67c087000000b0045845c5aaf6mr2721459vsi.18.1698409836686; Fri, 27 Oct 2023 05:30:36 -0700 (PDT) MIME-Version: 1.0 From: Paul B Mahol Date: Fri, 27 Oct 2023 14:38:37 +0200 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] [PATCH] avfillter/buffersrc: activate and EOF fix X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: jNxL4HujgVCa Patches attached. From 6bb41a6d27800825610d6dc77c8c0d7cf5c3a8e8 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 27 Oct 2023 14:33:00 +0200 Subject: [PATCH 2/2] avfilter/buffersrc: return AVERROR_EOF on EOF Fixes error when user keeps adding frames into filtergraph that reached EOF by other means, for example EOF is signalled by other filter in filtergraph or by buffersink. Signed-off-by: Paul B Mahol --- libavfilter/buffersrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 1216904721..b0a905d455 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -195,7 +195,7 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!frame) return av_buffersrc_close(ctx, s->last_pts, flags); if (s->eof) - return AVERROR(EINVAL); + return AVERROR_EOF; s->last_pts = frame->pts + frame->duration; -- 2.42.0