
Recherche avancée
Autres articles (54)
-
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 (7271)
-
FFMPEG : Can not free AVPacket when decode H264 stream ?
13 janvier 2016, par TTGroupI’m using FFMPEG to decode H264 stream, my code is below
AVFormatContext *pFormatCtx = NULL;
AVCodecContext *pCodecCtx = NULL;
AVFrame *pFrame = NULL;
AVPacket packet;
packet.data = NULL;
pFormatCtx = avformat_alloc_context();
avformat_open_input(&pFormatCtx, videoStreamPath, NULL, NULL);
liveHeader.pCodecCtx = pFormatCtx->streams[videoStreamIndex]->codec;
int bytesDecoded = 0;
int frameFinished = 0;
while (true)
{
while (packet.size > 0)
{
// Decode the next chunk of data
bytesDecoded = avcodec_decode_video2(pCodecCtx, pFrame,
&frameFinished, &packet);
// Was there an error?
if (bytesDecoded < 0)
{
printf(strErr, "Error while decoding frame\n");
commonGlobal->WriteRuntimeRecLogs(strErr);
return RS_NOT_OK;
}
packet.size -= bytesDecoded;
packet.data += bytesDecoded;
if (frameFinished)
{
//av_free_packet(&packet); //(free 1)
return RS_OK;
}
// Did we finish the current frame? Then we can return
}
do
{
try
{
int ret = av_read_frame(pFormatCtx, &packet);
if (ret < 0)
{
char strErr[STR_LENGTH_256];
if (ret == AVERROR_EOF || (pFormatCtx->pb && pFormatCtx->pb->eof_reached))
{
sprintf(strErr, "Error end of file line %d", __LINE__);
}
if (pFormatCtx->pb && pFormatCtx->pb->error)
{
sprintf(strErr, "Error end of file line %d", __LINE__);
}
packet.data = NULL;
return RS_NOT_OK;
}
}
catch (...)
{
packet.data = NULL;
return RS_NOT_OK;
}
} while (packet.stream_index != videoStreamIndex);
}
//av_free_packet(&packet); //(free 2)The problem is I don’t know how to free memory of
packet
correctly.I have tried to delete packet’s data by calling one of two places
av_free_packet(&packet); (free 1)
andav_free_packet(&packet); (free 2)
. And the result is the application was crashed with the message"Heap Corruption..."
If I do not free the
packet
, the memory leak is occur.Note that the above code is successful when decode
H264
stream, the main problem is memory leak and crashed when I try to free thepacket
Someone can show me the problems in my code.
Many thanks,
T&T
-
lavu : Add av_gettime_relative
22 octobre 2014, par Martin Storsjölavu : Add av_gettime_relative
Since av_gettime() is used in a number of places where actual
real time clock is required, the monotonic clock introduced in
ebef9f5a5 would have consequences that are hard to handle. Instead
split it into a separate function that can be used in the cases
where only relative time is desired.On platform where no monotonic clock is available, the difference
between the two av_gettime functions is not clear, and one could
mistakenly use the relative clock where an absolute one is
required. Therefore add an offset, to make it evident that the
time returned from av_gettime_relative never is actual current
real time, even though it is based on av_gettime.Based on a patch by Olivier Langlois.
Signed-off-by : Martin Storsjö <martin@martin.st>
-
Merge remote-tracking branch ’qatar/master’
15 mai 2013, par Michael NiedermayerMerge remote-tracking branch ’qatar/master’
* qatar/master :
configure : Use linker hardening flags on mingw
vc1 : Make INIT_LUT() self contained
vc1 : Simplify code by using INIT_LUT()
vc1 : Move INIT_LUT() further up to allow using it in more places
vc1dec : Remove some now unused variables
vc1dec : Do not allow field_mode to change after the first header
vc1, mss2 : Check for any negative return value from ff_vc1_parse_frame_header
vc1dec : Fix current ptr selection in vc1_mc_4mv_chroma()
vc1dec : Factorize picture pointer selection in vc1_mc_4mv_chroma()
vc1dec : Factorize picture pointer selection code
vc1dec : Factorize srcU/V offseting
vc1dec : Fix tff == 0 handling in init_block_index()
vc1dec : Update destination pointers in context for fieldsConflicts :
libavcodec/vc1.c
libavcodec/vc1dec.cMerged-by : Michael Niedermayer <michaelni@gmx.at>