
Recherche avancée
Autres articles (25)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (5271)
-
avformat/fitsdec : Fix potential leak of string in AVBPrint
7 janvier 2020, par Andreas Rheinhardt -
ffmpeg avformat_open_input() function causes memory leak when receiving live stream
12 septembre 2023, par george_dI have live streams (can be UDP or HLS, video codec is H264), from which I grab frames for further processing.


For this purpose, I use ffmpeg + nvjpeg + cuda libraries.


However I noticed memory leak - memory usage periodically (every 10-20 seconds) is increased by 100-400 KB, the amount and period may vary.


After disabling pieces of code one by one, I realized that it is
avformat_open_input()
which causes memory leak.

No matter which buffer settings (https://ffmpeg.org/ffmpeg-protocols.html#udp) I choose for UDP, the leak still persists. Same goes for HLS streams.


I tried to find anything related to this problem, but all the sources I found claimed that this problem took place in the past and has been fixed.


Is there some mysterious setting I am missing, so that memory could be freed properly ?


Or is this memory supposed to be freed when processing frames (i.e. using
av_read_frame()
andav_packet_unref()
, etc) ?

Minimal example of code to reproduce the problem :


avformat_example.cpp


#include 
extern "C" {
 #include <libavformat></libavformat>avformat.h>
 #include <libavcodec></libavcodec>avcodec.h>
}

int main(int argc, char *argv[]){
 if (argc < 2) {
 return 1;
 }

 char* inputSource = argv[1];
 AVFormatContext *ctx = NULL;

 if (avformat_open_input(&ctx, inputSource, NULL, NULL) != 0) {
 av_log(NULL,
 AV_LOG_ERROR,
 "Cannot open '%s'",
 inputSource);
 return 1;
 }

 /*
 This loop is placed here to demonstrate
 avformat_open_input() causing leak.
 Actually, instead of noop loop there is logic of getting and processing frames,
 but it doesn't matter now.
 As loop goes on, the amount of leaked memory increases.
 */
 while(true) {
 sleep(1);
 }

 return 0;
}



Compile with :


g++ avformat_example.cpp -lavcodec -lavutil -lavformat -I/usr/include/ffmpeg-cuda -o avformat_open_input_example



Run :


./avformat_open_input_example "udp://127.0.0.1:5000?reuse=1&pkt_size=1316&buffer_size=1310720&fifo_size=40000"



Version of ffmpeg underlying libraries :


libavutil 58. 7.100 / 58. 7.100
libavcodec 60. 11.100 / 60. 11.100
libavformat 60. 5.100 / 60. 5.100
libavdevice 60. 2.100 / 60. 2.100
libavfilter 9. 8.100 / 9. 8.100
libswscale 7. 2.100 / 7. 2.100
libswresample 4. 11.100 / 4. 11.100



-
avcodec/qsvenc : Fix leak and crash when encoding H.264 due to A53_CC
25 septembre 2021, par Andreas Rheinhardtavcodec/qsvenc : Fix leak and crash when encoding H.264 due to A53_CC
Since commit 3bbe0c210b05fc6fbd7b1d4bbd8479db7f2cf957, the Payloads
array of every QSVFrame leaks as soon as the frame is reused ;
the leak is small and not very noticeable, but if there is an attempt
to use said array the ensuing crash is much more noticeable.
This happens when encoding H.264 with A53 CC side data.Furthermore, if said array can not be allocated at all, an AVFrame
leaks.Fix all of this by not allocating the array separately at all ; put it
in QSVFrame instead and restore the Payloads array upon reusing the
frame.Finally, use av_freep() instead of av_free() to free the payload
entries.Reviewed-by : Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>