From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2C19A49561 for ; Tue, 13 Feb 2024 02:08:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F348368D155; Tue, 13 Feb 2024 04:08:07 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C71D68CD4B for ; Tue, 13 Feb 2024 04:08:01 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5D88BFF804 for ; Tue, 13 Feb 2024 02:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1707790080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=gsAIPPU1mphxMRkRM5Wy9m6F250h3LVn7OtEravzqJs=; b=NJtrnULdMpHcRshvoizcIVe+6icasfkjEY+SmtAsUoEolXDaalbOT8lC+ctPN0loBPc/rP IXXzATZ5o9TdxqnxlcO6dgjDUk8AcE7A4mQ7oSgohiNUo6XIbXqeVFsBjWBobv9V+mMSEt yvuKlsmkQtx0IR49Tl3MjBz6AmBD4zW3T3i8/O+cPwvOR50vlOqFIpFNR6tfQVVNFUz5ZD SHcd4i2tZEMM4bsm5ASc+b+tiEG51xmuR0fDOZg/I6LMI3EJlnBNIesz5LsgQV9Uzd8mO3 w6Ykj5qSpD/Nf1zG+5W3GrqFrsVvEiUmAvwumhrlCMAsF+73E6RwS2RQnPGmZQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 13 Feb 2024 03:07:59 +0100 Message-Id: <20240213020759.4284-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH] avfilter/vf_signature: Dont crash on no frames 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: Michael Niedermayer --- libavfilter/vf_signature.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c index 4896e8f2c11..53ed413a4ce 100644 --- a/libavfilter/vf_signature.c +++ b/libavfilter/vf_signature.c @@ -384,6 +384,9 @@ static int xml_export(AVFilterContext *ctx, StreamContext *sc, const char* filen FILE* f; unsigned int pot3[5] = { 3*3*3*3, 3*3*3, 3*3, 3, 1 }; + if (!sc->coarseend->last) + return AVERROR(EINVAL); // No frames ? + f = avpriv_fopen_utf8(filename, "w"); if (!f) { int err = AVERROR(EINVAL); -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".