Memory leak in swscale
In some tests I noticed that the swscale seems to have a memory leak
when converting from many formats to PIX_FMT_YUV420P
If I use PIX_FMT_YUYV422 or PIX_FMT_BGR24 as source format there is no
memory leak at all. If I use
PIX_FMT_YUVJ420P
PIX_FMT_BGRA
PIX_FMT_RGB555
PIX_FMT_RGB565
PIX_FMT_UYVY422
PIX_FMT_YUV420P
The memory on the encoder grows and never returns
I used to have no problem using the old image convert using
img_convert (
&m.pSrcPipeline[PipelineIdx + 1],
m.pEncoderContext->pix_fmt,
&m.pSrcPipeline[PipelineIdx],
m.SrcPixelFormat,
m.i32SrcWidth,
m.i32SrcHeight);
but now use below because of the aboves removal.
struct SwsContext *img_convert_ctx;
img_convert_ctx = sws_getContext(
m.i32SrcWidth,
m.i32SrcHeight,
m.SrcPixelFormat,
m.i32SrcWidth,
m.i32SrcHeight,
m.pEncoderContext->pix_fmt,
SWS_FAST_BILINEAR,
NULL,
NULL,
NULL);
sws_scale(
img_convert_ctx,
m.pSrcPipeline[PipelineIdx].data,
m.pSrcPipeline[PipelineIdx].linesize,
0,
m.i32SrcHeight,
m.pSrcPipeline[PipelineIdx + 1].data,
m.pSrcPipeline[PipelineIdx + 1].linesize);
sws_freeContext(img_convert_ctx);
any ideas why only YUY and RGB as input seem to not leak while the
others do?
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user