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 5E43F43799 for ; Tue, 28 Jun 2022 11:50:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 27DA968B938; Tue, 28 Jun 2022 14:50:43 +0300 (EEST) Received: from smtpbg.qq.com (smtpbg138.qq.com [106.55.201.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2926568B7C0 for ; Tue, 28 Jun 2022 14:50:35 +0300 (EEST) X-QQ-mid: bizesmtp69t1656417029t4rq1qoi Received: from localhost ( [103.107.217.226]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 28 Jun 2022 19:50:26 +0800 (CST) X-QQ-SSF: 01100000002000Z0Z000000A0000000 X-QQ-FEAT: MmehagGbncBqW2KU2zHDS17draPfmoSM2SuEEscpQaKG0PTxGIov6bVOctKLN LJhrpknFbxX5eVAqqWd1pLvWKVN6swxSo6hlQmILKXbymHB5PpRxyqIDpEOZixpC2IWNtPe +IDqhnJECMJNXMlXkskM4Urg+LQ3x0i+woA09CY3aoem0yXw0VLVRJgYmW7TIPxuCNuCkNq QBcdSXutMACwCsGAE4oXRxLz8OTQ5oxPewjIEtgyazRtB7ButfNhnGVHaGQyI64fwBSK4jW EL6KRKrB0ySxbKKgwiA2DNFx7QC6uptDa4JueUtGRlZONib2OSakZI+5DnJKPbyW84BFZPP xo36QzL X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Tue, 28 Jun 2022 19:50:23 +0800 Message-Id: <20220628115023.54166-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgspam:qybgspam10 Subject: [FFmpeg-devel] [PATCH] avcodec/encode: change the assert0 from (ret <= 0) to (ret >= 0) 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 Cc: Steven Liu 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: Because the codec->cb.encode return 0 is successed, and the negative error code should failed. Signed-off-by: Steven Liu --- libavcodec/encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index b68bf1e184..b43a16f708 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -217,7 +217,7 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt) avpkt->pts = avpkt->dts = frame->pts; } - av_assert0(ret <= 0); + av_assert0(ret >= 0); emms_c(); -- 2.25.0 _______________________________________________ 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".