
Recherche avancée
Autres articles (78)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (11920)
-
Memory leaks while doing memcpy
27 octobre 2013, par ZoellickI'm trying to write an utility dealing with ffmpeg. Once i need to copy image plane from one pointer to another. From AVPicture structure to my own.
Here is some sources.My own frame structe. Memory allocated in constructor, deallocated in destructor
template <class>
struct Frame
{
DataType* data; //!< Pointer to image data
int f_type; //!< Type of color space (ex. RGB, HSV, YUV)
int timestamp; //!< Like ID of frame. Time of this frame in the video file
int height; //!< Height of frame
int width; //!< Width of frame
Frame(int _height, int _width, int _f_type=0):
height(_height),width(_width),f_type(_f_type)
{
data = new DataType[_width*_height*3];
}
~Frame()
{
delete[] data;
}
};
</class>Here is the main loop performing conversion. If the line with memcpy is commented, there are no memory leaks at all. But if I uncomment it, the memory leak are present.
for(int i = begin; i < end; i++)
{
AVPicture pict;
avpicture_alloc(&pict, PIX_FMT_BGR24, _width, _height);
std::shared_ptr> frame(new Frame<char>(_height, _width, (int)PIX_FMT_BGR24));
sws_scale(ctx, frame_list[i]->data, frame_list[i]->linesize, 0, frame_list[i]->height, pict.data, pict.linesize);
memcpy(frame->data,pict.data[0],_width*_height*3);
//temp_to_add->push_back(std::shared_ptr>(frame));
avpicture_free(&pict);
}
</char>I've been trying lot of things such as : allocating memory via malloc and deallocating via free, copying memory from pict to frame by hands (in for loop), using std::copy and avpicture_layout that is ffmpeg helper function. Nothing helps.
So the question : do I forget about something important ?I will be grateful for every answer.
-
libFLAC : Fix potential meory leaks
9 août 2015, par Erik de Castro Lopo -
avformat/mux : Fix leaks on error when writing noninterleaved uncoded frames
11 avril 2020, par Andreas Rheinhardtavformat/mux : Fix leaks on error when writing noninterleaved uncoded frames
If writing uncoded frames in noninterleaved mode fails at the preparatory
steps (i.e. before it reaches write_packet()), the packet would not be
unreferenced and the frame would leak. This is fixed by unreferencing
the packet in write_uncoded_frame_internal() instead.This also makes it possible to remove the unreferencing in
write_packet() itself : In noninterleaved mode frames are now freed in
write_uncoded_frame_internal(), while they are freed in interleaved
mode when their containing packet gets unreferenced (like normal
packets).Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>