Andreas Rheinhardt <andreas.rheinha...@outlook.com> 于2022年6月28日周二 19:52写道:
>
> Steven Liu:
> > Because the codec->cb.encode return 0 is successed,
> > and the negative error code should failed.
> >
> > Signed-off-by: Steven Liu <l...@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..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();
> >
>
> You are asserting that encoding succeeds (and you allow encoders to
> return values > 0, which this check is meant to preclude). This is just
> wrong.
Should i only check succeeds !ret?

Thanks
Steven
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to