
Recherche avancée
Autres articles (45)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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" (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (6248)
-
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>