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 03EA6432DC for ; Tue, 21 May 2024 02:47:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A7F468D321; Tue, 21 May 2024 05:47:09 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CA91968D2C7 for ; Tue, 21 May 2024 05:47:00 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 16D3E240002 for ; Tue, 21 May 2024 02:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716259620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7GQO+nqbnzhh2OAA/D+SvZ3TewA8LAu9N3XU2Ast6Q0=; b=acADl9Rup6ekF6+Lb8Kzxj2AMgZPoF/ODrNTMV6Ap40tFPydXpx6FrgNR0TfUfjFs8IsMq jMcJ+h1Du3JtxHgvtfOIKyxwfzmbpYhW726ZMM4VqHy21SM31k8pUoV7qAcFk9Gp0b4cHu LoEli1UdJl5gzIEQuZrZED0F17x/QpbBTVDDROsH3Uw9o5pKsf0sbLI9aNI8jDxJUaTBgl +G+mRYd4vmhqrqBQ5AE3iaO53TIviKmr4OrzrfbJyIkjXiwnjctU9BlYqTM1h0rPBtQUkm +MDPw07oJhUdk/Shso5fxtAhlrojMI5XgVnbJspCEoydBSux2EgmrwCXTkbl2A== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 21 May 2024 04:46:51 +0200 Message-ID: <20240521024652.1006233-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240521024652.1006233-1-michael@niedermayer.cc> References: <20240521024652.1006233-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 6/7] tools/decode_simple: Check avcodec_send_packet() for errors on flushing 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 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: This will not error but the API allows errors so we should check it Fixes: CID1489999 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- tools/decode_simple.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/decode_simple.c b/tools/decode_simple.c index 6532e368d46..e8c1d6a407e 100644 --- a/tools/decode_simple.c +++ b/tools/decode_simple.c @@ -94,8 +94,9 @@ int ds_run(DecodeContext *dc) goto finish; } - avcodec_send_packet(dc->decoder, NULL); - ret = decode_read(dc, 1); + ret = avcodec_send_packet(dc->decoder, NULL); + if (ret >= 0) + ret = decode_read(dc, 1); if (ret < 0) { fprintf(stderr, "Error flushing: %d\n", ret); return ret; -- 2.45.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".