Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec/qsv_h2645: fix memory leak for plugin load

2021-02-01 Thread Anton Khirnov
Quoting Guangxin Xu (2021-01-30 04:19:27) > Hi Anton, Haihao > If this is the case, we allocated the string in caller, free and reallocate > it in callee. > It's not a good practice. > 1. It will make the user confused, The original qsvdec_other.c author and I > are both confused about this. >

Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec/qsv_h2645: fix memory leak for plugin load

2021-01-31 Thread Xiang, Haihao
> Hi Anton, Haihao > If this is the case, we allocated the string in caller, free and reallocate > it in callee. > It's not a good practice. > 1. It will make the user confused, The original qsvdec_other.c author and I > are both confused about this. >

Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec/qsv_h2645: fix memory leak for plugin load

2021-01-29 Thread Guangxin Xu
Hi Anton, Haihao If this is the case, we allocated the string in caller, free and reallocate it in callee. It's not a good practice. 1. It will make the user confused, The original qsvdec_other.c author and I are both confused about this.

Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec/qsv_h2645: fix memory leak for plugin load

2021-01-28 Thread Xiang, Haihao
On Wed, 2021-01-27 at 13:44 +0100, Anton Khirnov wrote: > Quoting Xu Guangxin (2021-01-05 03:43:37) > > --- > > libavcodec/qsvdec_h2645.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c > > index 02c41883b6..3d6e85230f 100644

Re: [FFmpeg-devel] [PATCH v2 1/6] avcodec/qsv_h2645: fix memory leak for plugin load

2021-01-27 Thread Anton Khirnov
Quoting Xu Guangxin (2021-01-05 03:43:37) > --- > libavcodec/qsvdec_h2645.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c > index 02c41883b6..3d6e85230f 100644 > --- a/libavcodec/qsvdec_h2645.c > +++ b/libavcodec/qsvdec_h2645.c >

[FFmpeg-devel] [PATCH v2 1/6] avcodec/qsv_h2645: fix memory leak for plugin load

2021-01-04 Thread Xu Guangxin
--- libavcodec/qsvdec_h2645.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c index 02c41883b6..3d6e85230f 100644 --- a/libavcodec/qsvdec_h2645.c +++ b/libavcodec/qsvdec_h2645.c @@ -69,6 +69,8 @@ static av_cold int