
Recherche avancée
Autres articles (58)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.
Sur d’autres sites (9937)
-
Does this code contain a potential memory leak ?
26 juillet 2017, par JohnnylinHere is the code :
cv::Mat YV12ToBRG24_FFmpeg(unsigned char* pYUV, int width,int height)
{
if (width < 1 || height < 1 || pYUV == nullptr){
return cv::Mat();
}
cv::Mat result(height,width,CV_8UC3, cv::Scalar::all(0));
uchar* pBGR24 = result.data;
AVFrame* pFrameYUV = av_frame_alloc();
pFrameYUV->width = width;
pFrameYUV->height = height;
pFrameYUV->format = AV_PIX_FMT_YUV420P;
av_image_fill_arrays(pFrameYUV->data, pFrameYUV->linesize, pYUV, AV_PIX_FMT_YUV420P, width, height, 1);
//U,V exchange
uint8_t * ptmp=pFrameYUV->data[1];
pFrameYUV->data[1]=pFrameYUV->data[2];
pFrameYUV->data[2]=ptmp;
AVFrame* pFrameBGR = av_frame_alloc();
pFrameBGR->width = width;
pFrameBGR->height = height;
pFrameBGR->format = AV_PIX_FMT_BGR24;
av_image_fill_arrays(pFrameBGR->data, pFrameBGR->linesize, pBGR24, AV_PIX_FMT_BGR24, width, height, 1);
struct SwsContext* imgCtx = nullptr;
imgCtx = sws_getContext(width,height,AV_PIX_FMT_YUV420P,width,height,AV_PIX_FMT_BGR24,SWS_BILINEAR,0,0,0);
if (imgCtx != nullptr){
sws_scale(imgCtx,pFrameYUV->data,pFrameYUV->linesize,0,height,pFrameBGR->data,pFrameBGR->linesize);
sws_freeContext(imgCtx);
imgCtx = nullptr;
ptmp = nullptr;
pBGR24 = nullptr;
av_frame_free(&pFrameYUV);
av_frame_free(&pFrameBGR);
return result;
}
else{
sws_freeContext(imgCtx);
imgCtx = nullptr;
ptmp = nullptr;
pBGR24 = nullptr;
av_frame_free(&pFrameYUV);
av_frame_free(&pFrameBGR);
return cv::Mat();
}
}This function is called every 40 ms (25 fps) and I saw a significant memory increase after several days(like 12GB). But if I ran this code for hours, the memory leak problem would not be obvious enough to be observed.
Can anyone help ?
Thanks. -
avformat/hevc : Fix potential leak in case of ff_hevc_annexb2mp4_buf failure
23 janvier 2020, par Andreas Rheinhardtavformat/hevc : Fix potential leak in case of ff_hevc_annexb2mp4_buf failure
ff_hevc_annexb2mp4_buf() could indicate an error, yet leave cleaning
after itself to the caller, so that a caller could not simply return the
error, but had to free the buffer first.(Given that all current callers have set filter_ps = 0, this error can
currently not be triggered.)Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by : James Almer <jamrial@gmail.com> -
lavc/vaapi_{decode, av1} : Fix memory leak in fail codepath
1er juillet 2024, par Fei Wang