thedo
User
 Fresh Boarder
| Posts: 1 |   |
|
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?
|