[FFmpeg-devel] swscale in vhooks

Víctor Paesa wzrlpy
Mon Jul 2 23:59:44 CEST 2007


Hi,

Ramiro Ribeiro Polla dijo:
> Hello,
>
>  wrote:
>> Hi,
>>
>> M?ns Rullg?rd dijo:
>>
>>> "V?ctor Paesa" <wzrlpy at arsystel.com> writes:
>>>
>>>
>>>> Hi,
>>>>
>>>> M?ns Rullg?rd dijo:
>>>>
>>>>> "V?ctor Paesa" writes:
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>>>> Revision 8013 added -lswscale unconditionally to Cygwin
>>>>>>>> VHOOKSHFLAGS. Is that still needed? It works fine without that
>>>>>>>> flag in MinGW. Also, setting that unconditionally and not giving
>>>>>>>> out errors on configure when the swscaler is not enabled causes
>>>>>>>> linking problems.
>>>>>>>>
>>>>>>> I'll give it a try tomorrow, it's a bit late here by now.
>>>>>>>
>>>>>> Thanks for noticing, indeed it may be removed, as Cygwin builds OK
>>>>>> with or without --enable-swscale after undoing r8013.
>>>>>>
>>>>>> M?ns, Diego, OK to commit the attached patch?
>>>>>>
>>>>> If it builds and works, sure.
>>>>>
>>>> I must apologize: this morning I built again
>>>> (--disable-static --enable-shared --enable-gpl --enable-swscaler)
>>>> and it failed. Maybe I had some leftover from previous compiles?
>>>>
>>>> Builds with "--disable-static --enable-shared --enable-gpl" or
>>>> "--disable-static --enable-shared" were OK this morning too.
>>>>
>>>> So I propose now another patch, instead of the previous one:
>>>>
>>>> Index: configure
>>>> ==================================================================>
>>>> --- configure	(revision 9451) +++ configure	(working copy)
>>>> @@ -1163,8 +1163,13 @@
>>>>      targetos=cygwin
>>>>      shlibdir="$bindir"
>>>>      dv1394="no"
>>>> -    VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat
>>>> -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libswscale
>>>> -L$(BUILD_ROOT)/libavutil' -    VHOOKLIBS='-lavformat$(BUILDSUF)
>>>> -lavcodec$(BUILDSUF) -lswscale$(BUILDSUF) -lavutil$(BUILDSUF)
>>>> $(EXTRALIBS)' +    if enabled swscaler; then
>>>> +        VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat
>>>> -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libswscale
>>>> -L$(BUILD_ROOT)/libavutil' +        VHOOKLIBS='-lavformat$(BUILDSUF)
>>>> -lavcodec$(BUILDSUF) -lswscale$(BUILDSUF) -lavutil$(BUILDSUF)
>>>> $(EXTRALIBS)' +    else
>>>> +        VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat
>>>> -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil' +
>>>> VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF)
>>>> -lavutil$(BUILDSUF) $(EXTRALIBS)' +    fi
>>>>      osextralibs=""
>>>>      EXESUF=".exe"
>>>>      SLIBPREF="cyg"
>>>>
>>> Please put only the bits that differ inside the if/else/fi.
>>>
>>
>> OK, here is the next attempt:
>>
>>
>
> What about doing the same as Makefile line 47, or even using that same
> code?

I can't make the change in Makefile, as vhook/Makefile overwrites
the values of VHOOKSHFLAGS,VHOOKLIBS with the ones in config.mak

But indeed the change in configure works well (much to my surprise,
I remember a time when the order of libraries was strict, but
my current ld 2.17.50 20060817 seems more lenient), and it
is easier to read, thanks for pointing to it.

OK to commit this attached forth attempt?

Regards,
V?ctor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.cygwin.unneeded-swscale.4.diff
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070702/e4a0e540/attachment.bin>



More information about the ffmpeg-devel mailing list