[vlc-commits] [Git][videolan/vlc][master] contrib: sam3: disable code calling ffmpeg/ffprobe from command-line

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue May 12 09:33:16 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
0de79dc3 by Steve Lhomme at 2026-05-12T08:51:09+00:00
contrib: sam3: disable code calling ffmpeg/ffprobe from command-line

- - - - -


2 changed files:

- + contrib/src/sam3/0001-disable-sam3_decode_video_frame.patch
- contrib/src/sam3/rules.mak


Changes:

=====================================
contrib/src/sam3/0001-disable-sam3_decode_video_frame.patch
=====================================
@@ -0,0 +1,50 @@
+From 0ce0345a616cfca35d7ecf73b39f078a08c89ba7 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 11 May 2026 10:24:53 +0200
+Subject: [PATCH] disable sam3_decode_video_frame()
+
+It's not used in VLC and calls ffmpeg/ffprobe as a command-line.
+It doesn't build in UWP and probably other targets as well.
+---
+ sam3.cpp | 2 ++
+ sam3.h   | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/sam3.cpp b/sam3.cpp
+index 43d88a8..6605a8e 100644
+--- a/sam3.cpp
++++ b/sam3.cpp
+@@ -12285,6 +12285,7 @@ bool sam3_save_mask(const sam3_mask& mask, const std::string& path) {
+                           mask.data.data(), mask.width) != 0;
+ }
+ 
++#if 0 // unused by VLC popen not support in UWP
+ sam3_image sam3_decode_video_frame(const std::string& video_path, int frame_index) {
+     sam3_image img;
+ 
+@@ -12352,6 +12353,7 @@ sam3_video_info sam3_get_video_info(const std::string& video_path) {
+     pclose(fp);
+     return info;
+ }
++#endif
+ 
+ /*****************************************************************************
+ ** Tokenizer — standalone test API (does not require model weights)
+diff --git a/sam3.h b/sam3.h
+index 204e487..2296318 100644
+--- a/sam3.h
++++ b/sam3.h
+@@ -305,8 +305,10 @@ sam3_result sam3_propagate_frame(
+ 
+ sam3_image      sam3_load_image(const std::string & path);
+ bool            sam3_save_mask(const sam3_mask & mask, const std::string & path);
++#if 0 // unused by VLC popen not supported in UWP
+ sam3_image      sam3_decode_video_frame(const std::string & video_path, int frame_index);
+ sam3_video_info sam3_get_video_info(const std::string & video_path);
++#endif
+ 
+ /*****************************************************************************
+ ** Test and Debug API
+-- 
+2.52.0.windows.1
+


=====================================
contrib/src/sam3/rules.mak
=====================================
@@ -24,6 +24,7 @@ $(TARBALLS)/sam3.cpp-$(SAM3_VERSION).tar.gz:
 sam3: sam3.cpp-$(SAM3_VERSION).tar.gz .sum-sam3
 	$(UNPACK)
 	$(APPLY) $(SRC)/sam3/0001-add-install-rules.patch
+	$(APPLY) $(SRC)/sam3/0001-disable-sam3_decode_video_frame.patch
 	$(MOVE)
 
 SAM3_CONF := \



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0de79dc3cc562d49f79e8e8bb5f1c4924467e972

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




More information about the vlc-commits mailing list