[FFmpeg-devel] [FFmpeg-cvslog] avformat/tls_schannel: add DTLS support

James Almer jamrial at gmail.com
Sun Jul 13 17:12:55 EEST 2025


On 7/13/2025 8:35 AM, Timo Rothenpieler wrote:
> 
> On 7/13/2025 4:59 AM, James Almer wrote:
>> On 7/12/2025 9:32 PM, Michael Niedermayer wrote:
>>> On Fri, Jul 11, 2025 at 04:04:17PM +0000, Timo Rothenpieler wrote:
>>>> ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> 
>>>> | Tue Jun 24 19:30:19 2025 +0200| 
>>>> [90fa9636efff84ec5a4b06815722c08188dca551] | committer: Timo 
>>>> Rothenpieler
>>>>
>>>> avformat/tls_schannel: add DTLS support
>>>>
>>>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/? 
>>>>> a=commit;h=90fa9636efff84ec5a4b06815722c08188dca551
>>>> ---
>>>>
>>>>   configure                  |   6 +-
>>>>   libavformat/tls_schannel.c | 890 +++++++++++++++++++++++++++++++++ 
>>>> + +++++++----
>>>>   libavformat/version.h      |   2 +-
>>>>   3 files changed, 833 insertions(+), 65 deletions(-)
>>>
>>> breaks on mingw64
>>>
>>> src/libavformat/tls_schannel.c: In function ‘ff_dtls_export_materials’:
>>> src/libavformat/tls_schannel.c:606:5: error: unknown type name 
>>> ‘SecPkgContext_KeyingMaterialInfo’; did you mean 
>>> ‘SecPkgContext_NegotiationInfo’?
>>
>> This type (and probably everything below) is API introduced on Windows 
>> 10, so unless you build targeting _WIN32_WINNT >= 0x0A00, it will not 
>> be defined.
>> So i guess we should make the tls_schannel.c force that value, like so:
> 
> It builds fine for me without doing that.

It may be you're using a newer mingw64 release that doesn't wrap those 
structs and defines in _WIN32_WINNT wrappers whereas Michael is using an 
older one provided by a stable distro as a crosscompiler package which does.
That, or Michael's mingw64 release doesn't even have them, which is the 
most likely scenario.

If it's the latter, then a configure check would need to be added like

> check_type "windows.h security.h schnlsp.h" "SecPkgContext_KeyingMaterialInfo"

And then make the dtls_protocol depend on it if using schannel, and 
wrappers added to tls_schannel.c where needed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250713/3d127350/attachment.sig>


More information about the ffmpeg-devel mailing list