AW: [Ffmpeg-devel] Strange nb_streams value

Wiese, Hendrik hendrik.wiese
Fri Mar 24 12:50:59 CET 2006

Hi hi... Sorry for writing over and over again, but I still 
urgently (!) need help and I want to let you know my newest 
experiences with the libs as I'm going to dispair.

I tried FFMPEG-0.4.9_pre1 because it is the newest revision 
that gave me a valid nb_streams value in my AVFormatContext 
(given by av_open_input_file). My next problem is, that the 
codec_id in my AVFormatContext is always (!) CODEC_ID_NONE, 
no matter which input file I use. It just has to be an AVI 
file. I'm really going to dispair... 

With the current CVS I get an annoying missbehaviour... The 
nb_streams value (and other fields) of the FormatContext 
given by av_open_input_file is invalid! It contains 
0xCCCCCCCC instead of the correct number of frames. Just 
before av_open_input_file returns, the value of nb_streams 
(and others) is VALID! But back in the function that called 
av_open_input_file, I can't work with these fields, because 
they aren't valid anymore. 

For info: I'm working with Windows. I tried 
ffmpeg-0.4.9_pre1 and the current CVS. I compiled them with 
MinGW (gcc-3.4.2). FFMPEG-0.4.9_pre1 compiled without any 
errors. The current CVS compiled with some undefined 
references to fseeko and similar. My program (that uses 
ffmpeg) is compiled using MSVC++ 6.0. 

And sorry for telling you again: I really need help with 

If you can't help me, please tell me why! I'll see, what
I can do to give you all required informations.


Hendrik Wiese

-----Urspr?ngliche Nachricht-----
Von: ffmpeg-devel-bounces at [mailto:ffmpeg-devel-bounces at] Im Auftrag von Wiese, Hendrik
Gesendet: Donnerstag, 23. M?rz 2006 12:57
An: FFMpeg development discussions and patches
Betreff: [Ffmpeg-devel] Strange nb_streams value
Wichtigkeit: Hoch

Hi again,
I got another heavy problem. After opening an AVI file with 
av_open_input_file(), the given AVFormatContext is invalid. 
av_open_input_file returned 0 so I think everything works 
fine inside the function. I looked into av_open_input_file 
and the AVFormatContext it generates is valid until the end 
of the function. Also the pointer returned by it is valid. 
But after the function returns it is invalid again, although 
it points to the correct location where the generated 
FormatContext was before the function returned. Just for 
your Information: I compile ffmpeg using MinGW (tried both 
'./configure --enable-shared --disable-static --disable-mmx' 
and './configure --enable-shared --disable-static 
--enable-memalignhack'). The Program that uses avformat and 
avcodec is compiled and linked by Microsoft Visual C++ 6.0. 
Please help this time... my other questions all stayed 
unanswered for some reason.


Hendrik Wiese

ffmpeg-devel mailing list
ffmpeg-devel at

More information about the ffmpeg-devel mailing list