[FFmpeg-devel] [PATCH] avcodec/encode: remove the = from assert0(ret <= 0)

Steven Liu lq at chinaffmpeg.org
Tue Jun 28 14:44:32 EEST 2022


Because the codec->cb.encode return 0 is successed,
so should only check negative error code.

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
 libavcodec/encode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index b68bf1e184..5cd9615da0 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



More information about the ffmpeg-devel mailing list