
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (74)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
MediaSPIP : Modification des droits de création d’objets et de publication définitive
11 novembre 2010, parPar défaut, MediaSPIP permet de créer 5 types d’objets.
Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (7271)
-
hevc_ps : make sure failing to decode an SPS always returns an error
13 juillet 2015, par Anton Khirnov -
(C) avcodec_receive_frame (ffmpeg) function always returns AVERROR(EAGAIN)
13 avril 2021, par LevyuI was following this tutorial : http://dranger.com/ffmpeg/tutorial01.html
and was trying to change some deprecated functions, and so I had to try to use the
avcodec_send_packet
andavcodec_receive_frame
functions.

The problem I'm having is that
avcodec_receive_frame
always returnsAVERROR(EAGAIN)
.

My decoding function is as follows :


static int decode(AVCodecContext *pCodecCtx, AVFrame *pFrame, AVPacket *packet) {
 
 int ret = avcodec_send_packet(pCodecCtx, packet);
 if (ret<0) {
 fprintf(stderr, "error sending packet for decoding\n");
 exit(1);
 }

 while (ret>=0) { 
 // avcodec_receive_packet(pCodecCtx, NULL);
 ret = avcodec_receive_frame(pCodecCtx, pFrame);
 if (ret == AVERROR(EAGAIN)) {
 fprintf(stderr, "\naverror(eagain) ret = %d\n", ret);
 return -1;
 }
 else if (ret == AVERROR_EOF) {
 fprintf(stderr, "eof\n");
 return -100;
 }
 else if (ret <0) {
 fprintf(stderr, "error during decoding\n");
 exit(1);
 }
 }
 return 0;
}



Everywhere I read said that this is solved by calling
avcodec_send_packet
with the next frame, but this does not solve the problem for me because this function is being called in a loop :


 while (av_read_frame(pFormatCtx, &packet)>=0) {
 // is this a packet from the video stream?
 if (packet.stream_index==videoStream) {

 frameNotFinished = decode(pCodecCtx, pFrame, &packet);

 // did we get a video frame?
 if (!frameNotFinished) fprintf(stderr, "it worked!");
 }
 av_packet_unref(&packet); 
 }



I should probably also add that
avcodec_send_packet
always returns 0 (success).

Any help would be much appreciated.


-
pngdec : Stop trying to decode once inflate returns Z_STREAM_END
28 septembre 2013, par Martin Storsjöpngdec : Stop trying to decode once inflate returns Z_STREAM_END
If the input buffer contains more data after the deflate stream,
the loop previously left running infinitely, with inflate returning
Z_STREAM_END.Reported-by : Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC : libav-stable@libav.org
Signed-off-by : Martin Storsjö <martin@martin.st>