[FFmpeg-devel] ffmpeg & static & state
Mon Oct 8 17:08:30 CEST 2007
On Mon, Oct 08, 2007 at 05:47:29PM +0300, Denis Otchenashko wrote:
> Hi everybody
> We have a problem on repeatitive video encodings within one process.
> First encoding passes OK but all the next fails because of incorrect state
> inside ffmpeg library.
> We are working on video recognition system and it is necessary to have some
> kind of decoding/encoding library inside our engine.
> It shall work without interrupting and exiting a process after each video.
> So it needs to decode/encode batch of files/streams without exiting a
> process in one endless cycle.
> We have taken ffmpeg.c code as a base and substituted a main function body
> with facade.
> The difference between main function and this facade is the last one
> processes a number of "command lines"
> The first command line is succesfully processed, but the next one is not.
> After reviewing ffmpeg code we noticed a lot of static variables which
> accumulates state between functions' calls.
> These statics are present in codecs and others parts. It works for the first
> iteration, but the state accumulated in the
> first decoding/encoding iteration does not allow to make the
> second/next iteration properly.
> We need to work out this problem in clean way.
if you dont want to call the ffmpeg executable then you should use libavcodec
and libavformat directly. ffmpeg.c is not designed to be used like you do
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel