[FFmpeg-devel] [PATCH] Fix compilation when only MPEG-1encoder is enabled
Panagiotis Issaris
takis.issaris
Thu May 10 16:06:24 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Aurelien,
Aurelien Jacobs wrote:
> On Thu, 10 May 2007 14:00:26 +0200
> Panagiotis Issaris <takis.issaris at uhasselt.be> wrote:
>> Aurelien Jacobs wrote:
>>> On Thu, 10 May 2007 13:34:53 +0200
>>> Panagiotis Issaris <takis.issaris at uhasselt.be> wrote:
>>>> The mpegvideo.c file unconditionally refers to code in the wmv2.c file.
>>>> As mpegvideo.c is compiled unconditionally, the attached patch removes
>>>> these references if wmv2 encoder support is not being compiled.
>>>>
>>>> When compiling ffmpeg code configured with the following options:
>>>> ./configure --disable-encoders --enable-encoder=mpeg1video
>>>>
>>>> Compilation was currently broken, and fixed with this patch.
>>> I'm currently in the process of fixing this. I might do it a different
>>> way.
>> I'm curiously awaiting it :)
>
> So just have a look ;-)
Ah! Beautiful! :-)
>> I could only think of compiling it all in,
>> or making sure mpegvideo.c doesn't reference it when it isn't available.
>> Unless of course your making bigger changes in mpegvideo.c, making the
>> ff_wmv_* code generic and adding it to some commonly compiled code, I
>> can't see a quick solution...
>
> Well, in fact it's almost the same solution as you used, just without
> the ugly ifdef jungle. But the result is the same.
Ah! You are right, looks much cleaner! I forgot about your work
regarding the conditional registration of codecs, which used the same
move-work-from-preprocessor-to-compiler trick :)
I remember reading about this some years ago, but never saw anyone use
it before the codec registration cleanup patches. One thing I'm
wondering about though, could there be compilers that are stupid enough
to just keep the code there even if the " if(0 and" is there?
>>> Note that there are much more references to mpeg4/wmv2 which needs
>>> to be disabled.
>> Weird, the patch worked fine here. For other configurations, such as
>> with all decoders disabled there seems to be one other reference to a
>> wmv2 decoding related function (line 4080 in mpegvideo.c) which would
>> cause problems.
>
> I mean with a different config. Try to only disable msmpeg4* and wmv2.
> There are reference to those files also in h263dec.c. Well just have a
> look at my commit and you will see.
Excellent! I couldn't image that you'd fix them all at once :)
>>> I should be able to fix it today.
>> Excellent :-)
>
> Done.
Thanks! :)
With friendly regards,
Takis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGQybg9kOxLuzz4CkRAmUEAJ94FN6seqRXeSRnMNDJCAh4TXksMACfddEv
tQTysOUHoCFX8cZ0Fr927Zk=
=Gx+J
-----END PGP SIGNATURE-----
More information about the ffmpeg-devel
mailing list