[vlc-commits] [Git][videolan/vlc][master] doc/libvlc: early return with help message instead of crash

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Aug 30 11:09:47 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
32551116 by Martin Finkel at 2025-08-30T10:55:42+00:00
doc/libvlc: early return with help message instead of crash

in case of missing input file

- - - - -


1 changed file:

- doc/libvlc/d3d11_player.cpp


Changes:

=====================================
doc/libvlc/d3d11_player.cpp
=====================================
@@ -693,6 +693,12 @@ int WINAPI WinMain(HINSTANCE hInstance,
     libvlc_media_t *p_media;
     (void)hPrevInstance;
 
+    if (strlen(lpCmdLine) == 0)
+    {
+        printf("Usage: d3d11_player.exe <video_file_path>\nNo file path provided.\n");
+        return 1;
+    }
+
     /* remove "" around the given path */
     if (lpCmdLine[0] == '"')
     {
@@ -755,6 +761,10 @@ int WINAPI WinMain(HINSTANCE hInstance,
 
     libvlc_media_player_play( Context.p_mp );
 
+    printf("Available interactions:\n");
+    printf("  - Press 'a' key to cycle through aspect ratios\n");
+    printf("  - Left mouse click to toggle play/pause\n\n");
+
     MSG msg;
 
     while(TRUE)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/325511163ae8f5bb7c8b64a423c9361ad70fc392

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/325511163ae8f5bb7c8b64a423c9361ad70fc392
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list