[FFmpeg-devel] [PATCH 2/2] avcodec/cfhd: properly handle midstream size changes for transform type 2

Michael Niedermayer michael at niedermayer.cc
Wed Dec 23 23:07:24 EET 2020


On Wed, Dec 23, 2020 at 05:01:44PM +0100, Paul B Mahol wrote:
> On Wed, Dec 23, 2020 at 4:07 PM Michael Niedermayer <michael at niedermayer.cc>
> wrote:
> 
> > On Wed, Dec 23, 2020 at 12:35:39PM +0100, Paul B Mahol wrote:
> > > Signed-off-by: Paul B Mahol <onemda at gmail.com>
> > > ---
> > >  libavcodec/cfhd.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
> > > index a4f4cb4b3c..ae0d4b9496 100644
> > > --- a/libavcodec/cfhd.c
> > > +++ b/libavcodec/cfhd.c
> > > @@ -1372,6 +1372,9 @@ static int update_thread_context(AVCodecContext
> > *dst, const AVCodecContext *src)
> > >      if (dst == src || psrc->transform_type == 0)
> > >          return 0;
> > >
> > > +    if (pdst->plane[0].idwt_size != psrc->plane[0].idwt_size)
> > > +        free_buffers(pdst);
> >
> > What if idwt_size is the same but the dimensions that is
> > width and height are not ?
> >
> 
> Yes, I will also check that.

then the change looks fine to me

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201223/f301e29c/attachment.sig>


More information about the ffmpeg-devel mailing list