[Ffmpeg-devel] Re: Visual studio .net problem
Mon Oct 17 11:36:09 CEST 2005
Scott Field wrote:
> Ian McIntosh <ianm <at> cat.co.za> writes:
>>>I just wanted to join because I have the same exact problem. I can link
>>>execute, but when it comes to avcodec_find_encoder or avcodec_find_decoder
>>>If anyone has made any finding I would love to hear them.
>>> I am working with:
>>>Visual Studio .NET 7.1.3088
>>>Windows XP Pro SP2
>>>ffmpeg version CVS, build 3276800, Copyright (c) 2000-2004 Fabrice Bellard
>>> configuration: --enable-memalign-hack --enable-mingw32 --enable-mp3lame
>>> built on Oct 4 2005 13:54:56, gcc: 3.2.3 (mingw special 20030504-1)
>>>./configure settings for libraries:
>>>--enable-memalign-hack --enable-mingw32 --enable-mp3lame --enable-shared
>>On the 3rd of october Ahmad Zaidee bin Abu sent a mail (subject: Problem
>>with returned AVCodecContext)
>>that hinted at a possible solution to this problem.
>>Here's the gist of what was said (thats relevant, I think):
>>// Register all formats and codecs
>>(have to do avcodec_init & avcodec_register_all, otherwise codec not found)
>>Possibly try this out and see if it resolves your problem. If so, then maybe
>>is a bug with the Windows implementation??
>>(new to ffmpeg)
> Thanks for the suggestion. I did a lot of av_log likes like Michael suggested
That's Michel. I dont mind, but there is *really* a Michael on the list
(Niedermayer) and he's a major league player, so better avoid the confusion.
> and this is what I discovered. This all has something to do with the variables
> declared as 'extern', i.e. first_avcodec, first_oformat, first_iformat, ... The
> avformat.dll is referencing a different version of the extern variables then my
> application. The reason that a call to avcodec_find_decoder returns NULL is
> because there is no codec list in the first_avcodec variable. The call to
> av_register_all() initializes the extern variables for itself. By your
> suggestion, avcodec_init() and avcodec_register_all() initialize the codec list
> for my application.
> So by adding those function calls fixes one problem but not all of them. Now if
> my application calls a function that references first_oformat through the
> avcodec.dll, again the refernce is not initialized.
> I am new to compiling with minGW so I am not sure how to resolve the issue of
> getting everything to properly reference the same instance of the 'extern'
Sounds related to the auto-import and enable-runtime-reloc problems. I
suggest a 'make clean' then make then post the whole compilation output,
zipped. (This is for the output, it wont fix your problem!) Then we can
look whether there are relevant gcc/ld warnings.
T +32  2 790 29 41
F +32  2 790 29 02
E mailto:mbardiaux at mediaxim.be
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
More information about the ffmpeg-devel