thedo
User

Fresh Boarder
Posts: 1
graphgraph
 
Click here to see the profile of this user
FFMpeg wrapper "stops" working - 2008/06/19 12:01 Using the AvDn wrapper (0.7) I have an application that creates a thumbnail for video files in the application I work on.

The code is amost identical to the CsAvcodecSample, except that the class is static, with 1 exported method (Preview), which returns an Image. The Image is the 5th frame of the video. All the member fields in the demo are now local variables in the Preview method.

This works fine for the 1st call, but subsequent calls (even on the same video that worked initially) fail. The part that fails is

if (codecCtx.OpenDecoder() < 0)
return null;

the only difference between a good call and a failing call is that the codecCtx.PixFmt is 0 for a successful call, and -1 wen it fails, but setting this manually doesnt help.

I have a feeling that theres some memory leaking somewhere, and something that should be initialized is being missed. Any ideas anyone?
  | | No public write access. Please register.
Daniel
Admin

Admin
Posts: 44
graph
 
Click here to see the profile of this user
Re:FFMpeg wrapper "stops" working - 2008/06/20 14:35 The method OpenDecoder calls ffmpeg avcodec_open function which does a lot of initializations.

Can you modify your code in such a way that this function is called once per file (instead of once per frame extraction)?
  | | No public write access. Please register.
Joomla Template by Joomlashack
Joomla Templates by JoomlaShack Joomla Templates by Compass Design