[FFmpeg-user] AVFormatContext and callback
Denis
denisgottardello at gmail.com
Tue Jan 24 22:39:20 CET 2012
I think there is something that does not work correctly in AVFormatContext and callbacks.
Uning this code
AVFormatContext *pAVFormatContext= avformat_alloc_context();
if (avformat_open_input(&pAVFormatContext, "aa.mp4", NULL, 0)!= 0) qDebug() << "Errore avformat_open_input !!!";
I can read correctly all type of format.
Using a callback like this code:
AVIOContext *pAVIOContext= avio_alloc_context(pBuffer, BUFFERSIZE, 0, this, ReadPacket, NULL, NULL);
AVFormatContext *pAVFormatContext= avformat_alloc_context();
pAVFormatContext->pb= pAVIOContext;
With some file does not work. Try this file for example: www.denisgottardello.it/aa.mp4 is impossible to read. Without a callback all works
well.
I suppose that you think is my callback to be wrong. With a old version of ffmpeg, using some deprecated functions all works well.
Have you notice that the callbacks is not verified with the latest version of ffmpeg? The callbacks is very important for me. I'm writing a
videosurveillance application that must to implement x264 and theora codecs. I need to use ffmpeg for manage, send across the network
and store the movies.
--
www.denisgottardello.it
Skype: mrdebug
Videosurveillance and home automation!
http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php
More information about the ffmpeg-user
mailing list