Skip to content

Commit

Permalink
[gstreamer] Fix multiple definition of functions (microsoft#42638)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwang118 authored Dec 17, 2024
1 parent b322364 commit a258b5e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 2 deletions.
35 changes: 35 additions & 0 deletions ports/gstreamer/fix-multiple-def.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/subprojects/gst-plugins-bad/gst/siren/common.c b/subprojects/gst-plugins-bad/gst/siren/common.c
index 2e07748..70f58f6 100644
--- a/subprojects/gst-plugins-bad/gst/siren/common.c
+++ b/subprojects/gst-plugins-bad/gst/siren/common.c
@@ -44,7 +44,7 @@ int max_bin[8] = {
1
};

-float step_size[8] = {
+float stp_size[8] = {
0.3536f,
0.5f,
0.70709997f,
@@ -87,7 +87,7 @@ siren_init (void)
(float) pow (10, (i - 24 + 0.5) * STEPSIZE);

for (i = 0; i < 8; i++)
- step_size_inverse[i] = (float) 1.0 / step_size[i];
+ step_size_inverse[i] = (float) 1.0 / stp_size[i];

siren_dct4_init ();
siren_rmlt_init ();
diff --git a/subprojects/gst-plugins-bad/gst/siren/common.h b/subprojects/gst-plugins-bad/gst/siren/common.h
index e09e533..123b888 100644
--- a/subprojects/gst-plugins-bad/gst/siren/common.h
+++ b/subprojects/gst-plugins-bad/gst/siren/common.h
@@ -95,7 +95,7 @@ extern int vector_dimension[8];
extern int number_of_vectors[8];
extern float dead_zone[8];
extern int max_bin[8];
-extern float step_size[8];
+extern float stp_size[8];
extern float step_size_inverse[8];


1 change: 1 addition & 0 deletions ports/gstreamer/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ vcpkg_from_gitlab(
fix-bz2-windows-debug-dependency.patch
no-downloads.patch
${PATCHES}
fix-multiple-def.patch
)

vcpkg_find_acquire_program(FLEX)
Expand Down
2 changes: 1 addition & 1 deletion ports/gstreamer/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gstreamer",
"version": "1.24.7",
"port-version": 1,
"port-version": 2,
"description": "GStreamer open-source multimedia framework core library",
"homepage": "https://gstreamer.freedesktop.org/",
"license": "LGPL-2.0-only",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3310,7 +3310,7 @@
},
"gstreamer": {
"baseline": "1.24.7",
"port-version": 1
"port-version": 2
},
"gtest": {
"baseline": "1.15.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gstreamer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "895e28954cc355e23abad8b4babb540f5de2db6b",
"version": "1.24.7",
"port-version": 2
},
{
"git-tree": "018489638670c73b79e737bb3fe4d1e6452697f9",
"version": "1.24.7",
Expand Down

0 comments on commit a258b5e

Please sign in to comment.