diff mbox

[FFmpeg-devel] configure: ole32 is needed for shared libavcodec linking with dxva2.

Message ID CAB0OVGqcre=-w2D3wyFR8sj0-Z1KMg0ZKwd-MNgiaR0Z4p9UXA@mail.gmail.com
State Rejected
Headers show

Commit Message

Carl Eugen Hoyos Dec. 30, 2018, 8:16 p.m. UTC
Hi!

Attached patch fixes a Windows linking issue described in ticket #7642,
only shared linking was tested so far.

Please comment, Carl Eugen

Comments

Hendrik Leppkes Dec. 30, 2018, 8:37 p.m. UTC | #1
On Sun, Dec 30, 2018 at 9:16 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>
> Hi!
>
> Attached patch fixes a Windows linking issue described in ticket #7642,
> only shared linking was tested so far.
>

ole32 is a dependency of dxva2 already, it should already be pulled in
through that, shouldn't it?

- Hendrik
Carl Eugen Hoyos Dec. 30, 2018, 8:52 p.m. UTC | #2
2018-12-30 21:37 GMT+01:00, Hendrik Leppkes <h.leppkes@gmail.com>:
> On Sun, Dec 30, 2018 at 9:16 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

>> Attached patch fixes a Windows linking issue described in ticket #7642,
>> only shared linking was tested so far.
>
> ole32 is a dependency of dxva2 already, it should already be pulled in
> through that, shouldn't it?

Please test this...

Carl Eugen
Carl Eugen Hoyos Dec. 31, 2018, 1:10 a.m. UTC | #3
2018-12-30 21:16 GMT+01:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> Attached patch fixes a Windows linking issue described in ticket #7642,
> only shared linking was tested so far.

Works fine with both static and dynamic linking.

Carl Eugen
James Almer Dec. 31, 2018, 1:44 a.m. UTC | #4
On 12/30/2018 5:52 PM, Carl Eugen Hoyos wrote:
> 2018-12-30 21:37 GMT+01:00, Hendrik Leppkes <h.leppkes@gmail.com>:
>> On Sun, Dec 30, 2018 at 9:16 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> 
>>> Attached patch fixes a Windows linking issue described in ticket #7642,
>>> only shared linking was tested so far.
>>
>> ole32 is a dependency of dxva2 already, it should already be pulled in
>> through that, shouldn't it?
> 
> Please test this...
> 
> Carl Eugen

The issue here is that dxva2 is enabled (thus compiling dxva2.c), but
every dxva2 module isn't, which means the dependency generator in
configure will not pull dxva2 dependencies for avcodec.

I think the more correct solution would be to add dxva2_extralibs to
avcodec_extralibs.
Carl Eugen Hoyos Jan. 6, 2019, 1:32 p.m. UTC | #5
2018-12-31 2:44 GMT+01:00, James Almer <jamrial@gmail.com>:
> On 12/30/2018 5:52 PM, Carl Eugen Hoyos wrote:
>> 2018-12-30 21:37 GMT+01:00, Hendrik Leppkes <h.leppkes@gmail.com>:
>>> On Sun, Dec 30, 2018 at 9:16 PM Carl Eugen Hoyos <ceffmpeg@gmail.com>
>>> wrote:
>>
>>>> Attached patch fixes a Windows linking issue described in ticket #7642,
>>>> only shared linking was tested so far.
>>>
>>> ole32 is a dependency of dxva2 already, it should already be pulled in
>>> through that, shouldn't it?
>>
>> Please test this...
>>
>> Carl Eugen
>
> The issue here is that dxva2 is enabled (thus compiling dxva2.c), but
> every dxva2 module isn't, which means the dependency generator in
> configure will not pull dxva2 dependencies for avcodec.
>
> I think the more correct solution would be to add dxva2_extralibs to
> avcodec_extralibs.

I will push my patch if no alternative solutions are provided.

Carl Eugen
James Almer Jan. 6, 2019, 1:57 p.m. UTC | #6
On 1/6/2019 10:32 AM, Carl Eugen Hoyos wrote:
> 2018-12-31 2:44 GMT+01:00, James Almer <jamrial@gmail.com>:
>> On 12/30/2018 5:52 PM, Carl Eugen Hoyos wrote:
>>> 2018-12-30 21:37 GMT+01:00, Hendrik Leppkes <h.leppkes@gmail.com>:
>>>> On Sun, Dec 30, 2018 at 9:16 PM Carl Eugen Hoyos <ceffmpeg@gmail.com>
>>>> wrote:
>>>
>>>>> Attached patch fixes a Windows linking issue described in ticket #7642,
>>>>> only shared linking was tested so far.
>>>>
>>>> ole32 is a dependency of dxva2 already, it should already be pulled in
>>>> through that, shouldn't it?
>>>
>>> Please test this...
>>>
>>> Carl Eugen
>>
>> The issue here is that dxva2 is enabled (thus compiling dxva2.c), but
>> every dxva2 module isn't, which means the dependency generator in
>> configure will not pull dxva2 dependencies for avcodec.
>>
>> I think the more correct solution would be to add dxva2_extralibs to
>> avcodec_extralibs.
> 
> I will push my patch if no alternative solutions are provided.
> 
> Carl Eugen

I just gave you one. Can you send another patch adding dxva2_extralibs
to avcodec_extralibs?
Carl Eugen Hoyos Jan. 6, 2019, 2:08 p.m. UTC | #7
2019-01-06 14:57 GMT+01:00, James Almer <jamrial@gmail.com>:
> On 1/6/2019 10:32 AM, Carl Eugen Hoyos wrote:
>> 2018-12-31 2:44 GMT+01:00, James Almer <jamrial@gmail.com>:
>>> On 12/30/2018 5:52 PM, Carl Eugen Hoyos wrote:
>>>> 2018-12-30 21:37 GMT+01:00, Hendrik Leppkes <h.leppkes@gmail.com>:
>>>>> On Sun, Dec 30, 2018 at 9:16 PM Carl Eugen Hoyos <ceffmpeg@gmail.com>
>>>>> wrote:
>>>>
>>>>>> Attached patch fixes a Windows linking issue described in ticket
>>>>>> #7642,
>>>>>> only shared linking was tested so far.
>>>>>
>>>>> ole32 is a dependency of dxva2 already, it should already be pulled in
>>>>> through that, shouldn't it?
>>>>
>>>> Please test this...
>>>>
>>>> Carl Eugen
>>>
>>> The issue here is that dxva2 is enabled (thus compiling dxva2.c), but
>>> every dxva2 module isn't, which means the dependency generator in
>>> configure will not pull dxva2 dependencies for avcodec.
>>>
>>> I think the more correct solution would be to add dxva2_extralibs to
>>> avcodec_extralibs.
>>
>> I will push my patch if no alternative solutions are provided.
>>
>> Carl Eugen
>
> I just gave you one. Can you send another patch adding dxva2_extralibs
> to avcodec_extralibs?

No, unfortunately I cannot test, but please do!

Carl Eugen
diff mbox

Patch

From f01b6c216b5fc970b374160efdc0f834d99d328d Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sun, 30 Dec 2018 21:04:14 +0100
Subject: [PATCH] configure: ole32 is needed for shared libavcodec linking
 with dxva2.

Fixes ticket #7642.

Tested-by: Stephen Baker
---
 configure |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 04d3417..a636939 100755
--- a/configure
+++ b/configure
@@ -3527,7 +3527,7 @@  cws2fws_extralibs="zlib_extralibs"
 
 # libraries, in any order
 avcodec_deps="avutil"
-avcodec_suggest="libm"
+avcodec_suggest="libm ole32"
 avcodec_select="null_bsf"
 avdevice_deps="avformat avcodec avutil"
 avdevice_suggest="libm"
@@ -3554,7 +3554,7 @@  ffmpeg_deps="avcodec avfilter avformat"
 ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter
                null_filter
                trim_filter"
-ffmpeg_suggest="ole32 psapi shell32"
+ffmpeg_suggest="psapi shell32"
 ffplay_deps="avcodec avformat swscale swresample sdl2"
 ffplay_select="rdft crop_filter transpose_filter hflip_filter vflip_filter rotate_filter"
 ffplay_suggest="shell32"
-- 
1.7.10.4