Re: [FFmpeg-devel] [PATCH 07/10] sws: add a new scaling API

2021-08-09 Thread Anton Khirnov
Quoting James Almer (2021-08-09 05:45:09) > On 8/8/2021 2:29 PM, Anton Khirnov wrote: > > +int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src) > > +{ > > +int ret, allocated = 0; > > + > > +ret = av_frame_ref(c->frame_src, src); > > +if (ret < 0) > > +ret

Re: [FFmpeg-devel] [PATCH 07/10] sws: add a new scaling API

2021-08-08 Thread James Almer
On 8/8/2021 2:29 PM, Anton Khirnov wrote: +int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src) +{ +int ret, allocated = 0; + +ret = av_frame_ref(c->frame_src, src); +if (ret < 0) +return ret; + +if (!dst->buf[0]) { The frame could have non refcoun