Dominik Rau wrote:
Hi. I use libavcodec/libavformat in a 3D application to decode videos and apply them as textures on surfaces. I encapsulated the tutorial code by Martin Boehme (http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html) into a C++ class to get rid of all the global variables (AVCodec*, AVCodecContext* etc. are now member variables of this class) and update the texture in an additional thread. Basically this works fine. The problems begin, if I try to decode more than one stream at the same time: Instead of the video, there's only flickering - the same flickering on both surfaces. What goes wrong here? I don't share any data between the objects (no static members). Any ideas what's going wrong here and how to solve this?
This happens on a Debian (sid/unstable) with libav[codec|format]cvs-dev packages in version 3:20051016-0.1.
What happens if you write the frames to a file instead of sending them to the texture? Maybe something's going wrong with your texture update? Do I understand you correctly that you're doing the video decoding in a separate thread from the texture update? Martin -- Martin B?hme Inst. f. Neuro- and Bioinformatics Ratzeburger Allee 160, D-23538 Luebeck Phone: +49 451 500 5514 Fax: +49 451 500 5502 boehme at inb.uni-luebeck.de