ffmpeg/libavdevice
Martin Storsjö f80b2ce9fa gdigrab: Fix hwnd parameter issues
Converting from an integer to HWND (which is a pointer) requires
an explicit cast, otherwise Clang errors out like this:

    src/libavdevice/gdigrab.c:280:14: error: incompatible integer to pointer conversion assigning to 'HWND' (aka 'struct HWND__ *') from 'long' [-Wint-conversion]
      280 |         hwnd = strtol(name, &p, 0);
          |              ^ ~~~~~~~~~~~~~~~~~~~

(With GCC and MSVC, this was a mere warning, but with recent Clang,
this is an error.)

After adding a cast, all compilers also warn something like this:

    src/libavdevice/gdigrab.c:280:16: warning: cast to 'HWND' (aka 'struct HWND__ *') from smaller integer type 'long' [-Wint-to-pointer-cast]
      280 |         hwnd = (HWND) strtol(name, &p, 0);
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~

On Windows, long types are 32 bit, so to get a usable pointer, we
need to use long long. And interpret it as unsigned long long
while at it - i.e. using strtoull.

Finally, right above it, the code triggered the following warning:

    src/libavdevice/gdigrab.c:278:15: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
      278 |         char *p;
          |               ^

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-12-19 00:07:26 +02:00
..
tests
.gitignore
Makefile avdevice/decklink_enc: add support for playout of 608 captions in MOV files 2023-05-11 22:06:20 +08:00
alldevices.c
alsa.c
alsa.h
alsa_dec.c
alsa_enc.c avformat/avformat: Avoid including codec.h, frame.h 2023-09-07 00:30:08 +02:00
android_camera.c avdevice/android_camera: fix build failure due to typo 2023-11-07 11:10:07 +08:00
audiotoolbox.m avdevice/audiotoolbox: Fix availability macro check 2023-12-12 22:01:14 +01:00
avdevice.c
avdevice.h
avdeviceres.rc
avfoundation.m avfoundation: Fix version checks 2023-12-15 11:27:23 +01:00
bktr.c
caca.c
ccfifo.c avdevice/decklink_enc: add support for playout of 608 captions in MOV files 2023-05-11 22:06:20 +08:00
decklink_common.cpp avdevice/decklink_enc: add support for SMPTE 2038 VANC packet output 2023-07-02 19:57:45 +02:00
decklink_common.h avdevice/decklink_enc: add support for SMPTE 2038 VANC packet output 2023-07-02 19:57:45 +02:00
decklink_common_c.h avdevice/decklink_enc: add support for SMPTE 2038 VANC packet output 2023-07-02 19:57:45 +02:00
decklink_dec.cpp avdevice/decklink_dec: add explicit specifier 2023-11-21 08:02:29 +08:00
decklink_dec.h
decklink_dec_c.c
decklink_enc.cpp avformat/vapoursynth: Add missing inclusion of frame.h 2023-09-10 17:32:11 +02:00
decklink_enc.h
decklink_enc_c.c avdevice/decklink_enc: add support for SMPTE 2038 VANC packet output 2023-07-02 19:57:45 +02:00
dshow.c
dshow_capture.h configure: Set WIN32_LEAN_AND_MEAN at configure time 2023-08-14 22:57:28 +03:00
dshow_common.c
dshow_crossbar.c
dshow_enummediatypes.c
dshow_enumpins.c
dshow_filter.c
dshow_pin.c
fbdev_common.c avdevice/fbdev_common: Make declaration proper prototype 2023-09-28 11:10:35 +02:00
fbdev_common.h
fbdev_dec.c
fbdev_enc.c
file_open.c
gdigrab.c gdigrab: Fix hwnd parameter issues 2023-12-19 00:07:26 +02:00
iec61883.c
internal.h
jack.c
kmsgrab.c
lavfi.c avdevice/lavfi: Fix double-free on error 2023-09-30 12:27:44 +02:00
libavdevice.v
libcdio.c
libdc1394.c
openal-dec.c
opengl_enc.c all: Replace __FUNCTION__ by __func__ 2023-09-07 00:48:50 +02:00
opengl_enc_shaders.h
oss.c
oss.h
oss_dec.c
oss_enc.c
pulse_audio_common.c
pulse_audio_common.h avdevice/pulse_audio_common: Avoid inclusion of avcodec.h 2023-08-05 09:40:06 +02:00
pulse_audio_dec.c
pulse_audio_enc.c apply spelling fixes 2023-11-18 19:55:42 +01:00
reverse.c
sdl2.c
sndio.c
sndio.h
sndio_dec.c
sndio_enc.c
timefilter.c
timefilter.h
utils.c
v4l2-common.c
v4l2-common.h
v4l2.c
v4l2enc.c
version.c
version.h Bump versions after 6.1 2023-10-29 16:19:14 +01:00
version_major.h Bump major versions of all libraries 2023-02-09 15:35:14 +01:00
vfwcap.c
xcbgrab.c
xv.c avutil/imgutils: Add wrapper for av_image_copy() to avoid casts 2023-09-12 09:42:27 +02:00