Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
6fded96b
Commit
6fded96b
authored
Mar 26, 2009
by
Pavlov Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix live555 locale patch once again.
parent
d9925fb9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
56 deletions
+58
-56
extras/contrib/src/Patches/live-uselocale.patch
extras/contrib/src/Patches/live-uselocale.patch
+58
-56
No files found.
extras/contrib/src/Patches/live-uselocale.patch
View file @
6fded96b
Copyright (C) 2008 Rémi Denis-Courmont, adaptation by Felix Kühne (C) 2009.
Licensed under GNU General Public License version 2 or higher.
diff -
ru live-
orig/config.mingw live/config.mingw
--- live
-orig/config.mingw 2009-02-13 09:09:42.000000000 +01
00
+++ live/config.mingw 2009-0
2-20 14:17:20.000000000 +01
00
diff -
urN live.
orig/config.mingw live/config.mingw
--- live
.orig/config.mingw 2009-03-23 01:26:16 +03
00
+++ live/config.mingw 2009-0
3-26 19:17:43 +03
00
@@ -1,4 +1,4 @@
-COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int
+COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED
C = c
C_COMPILER = $(CC)
C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__MINGW32__
diff -ru live-orig/liveMedia/Locale.cpp live/liveMedia/Locale.cpp
--- live-orig/liveMedia/Locale.cpp 2009-02-13 09:09:42.000000000 +0100
+++ live/liveMedia/Locale.cpp 2009-02-20 14:17:20.000000000 +0100
@@ -22,19 +22,18 @@
#include "Locale.hh"
#include <strDup.hh>
-Locale::Locale(char const* newLocale, int category)
- : fCategory(category) {
+Locale::Locale(char const* newLocale, int category) {
#ifndef LOCALE_NOT_USED
- fPrevLocale = strDup(setlocale(category, NULL));
- setlocale(category, newLocale);
+ fLocale = newlocale(category, newLocale, NULL);
+ fPrevLocale = uselocale(fLocale);
#endif
}
Locale::~Locale() {
#ifndef LOCALE_NOT_USED
- if (fPrevLocale != NULL) {
- setlocale(fCategory, fPrevLocale);
- delete[] fPrevLocale;
+ if (fLocale != (locale_t)0) {
+ uselocale(fPrevLocale);
+ freelocale(fLocale);
}
#endif
}
--- live/liveMedia/RTSPCommon.cpp.orig 2009-01-26 20:18:41.000000000 +0100
+++ live/liveMedia/RTSPCommon.cpp 2009-03-25 20:35:43.000000000 +0100
@@ -146,7 +146,7 @@
char const* fields = buf + 7;
while (*fields == ' ') ++fields;
double start, end;
- Locale("C", LC_NUMERIC);
+ Locale("C", LC_NUMERIC_MASK);
if (sscanf(fields, "npt = %lf - %lf", &start, &end) == 2) {
rangeStart = start;
rangeEnd = end;diff -ru live-orig/liveMedia/RTSPCommon.cpp live/liveMedia/RTSPCommon.cpp
diff -ru live-orig/liveMedia/include/Locale.hh live/liveMedia/include/Locale.hh
--- live-orig/liveMedia/include/Locale.hh 2009-02-13 09:09:42.000000000 +0100
+++ live/liveMedia/include/Locale.hh 2009-02-20 14:17:20.000000000 +0100
diff -urN live.orig/liveMedia/include/Locale.hh live/liveMedia/include/Locale.hh
--- live.orig/liveMedia/include/Locale.hh 2009-03-23 01:26:16 +0300
+++ live/liveMedia/include/Locale.hh 2009-03-26 19:17:43 +0300
@@ -27,23 +27,26 @@
#ifndef LOCALE_NOT_USED
...
...
@@ -86,14 +46,44 @@ diff -ru live-orig/liveMedia/include/Locale.hh live/liveMedia/include/Locale.hh
};
#endif
--- live/liveMedia/RTSPClient.cpp.orig 2009-01-26 20:18:41.000000000 +0100
+++ live/liveMedia/RTSPClient.cpp 2009-03-25 20:35:18.000000000 +0100
diff -urN live.orig/liveMedia/Locale.cpp live/liveMedia/Locale.cpp
--- live.orig/liveMedia/Locale.cpp 2009-03-23 01:26:16 +0300
+++ live/liveMedia/Locale.cpp 2009-03-26 19:17:43 +0300
@@ -22,19 +22,18 @@
#include "Locale.hh"
#include <strDup.hh>
-Locale::Locale(char const* newLocale, int category)
- : fCategory(category) {
+Locale::Locale(char const* newLocale, int category) {
#ifndef LOCALE_NOT_USED
- fPrevLocale = strDup(setlocale(category, NULL));
- setlocale(category, newLocale);
+ fLocale = newlocale(category, newLocale, NULL);
+ fPrevLocale = uselocale(fLocale);
#endif
}
Locale::~Locale() {
#ifndef LOCALE_NOT_USED
- if (fPrevLocale != NULL) {
- setlocale(fCategory, fPrevLocale);
- delete[] fPrevLocale;
+ if (fLocale != (locale_t)0) {
+ uselocale(fPrevLocale);
+ freelocale(fLocale);
}
#endif
}
diff -urN live.orig/liveMedia/RTSPClient.cpp live/liveMedia/RTSPClient.cpp
--- live.orig/liveMedia/RTSPClient.cpp 2009-03-23 01:26:16 +0300
+++ live/liveMedia/RTSPClient.cpp 2009-03-26 19:29:38 +0300
@@ -1019,7 +1019,7 @@
// This is the default value; we don't need a "Scale:" header:
buf[0] = '\0';
} else {
- Locale("C", LC_NUMERIC);
+ Locale("C", LC_NUMERIC_MASK);
- Locale
l
("C", LC_NUMERIC);
+ Locale
l
("C", LC_NUMERIC_MASK);
sprintf(buf, "Scale: %f\r\n", scale);
}
...
...
@@ -101,13 +91,13 @@ diff -ru live-orig/liveMedia/include/Locale.hh live/liveMedia/include/Locale.hh
buf[0] = '\0';
} else if (end < 0) {
// There's no end time:
- Locale("C", LC_NUMERIC);
+ Locale("C", LC_NUMERIC_MASK);
- Locale
l
("C", LC_NUMERIC);
+ Locale
l
("C", LC_NUMERIC_MASK);
sprintf(buf, "Range: npt=%.3f-\r\n", start);
} else {
// There's both a start and an end time; include them both in the "Range:" hdr
- Locale("C", LC_NUMERIC);
+ Locale("C", LC_NUMERIC_MASK);
- Locale
l
("C", LC_NUMERIC);
+ Locale
l
("C", LC_NUMERIC_MASK);
sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
}
...
...
@@ -115,8 +105,20 @@ diff -ru live-orig/liveMedia/include/Locale.hh live/liveMedia/include/Locale.hh
if (_strncasecmp(line, "Scale: ", 7) != 0) return False;
line += 7;
- Locale("C", LC_NUMERIC);
+ Locale("C", LC_NUMERIC_MASK);
- Locale
l
("C", LC_NUMERIC);
+ Locale
l
("C", LC_NUMERIC_MASK);
return sscanf(line, "%f", &scale) == 1;
}
diff -urN live.orig/liveMedia/RTSPCommon.cpp live/liveMedia/RTSPCommon.cpp
--- live.orig/liveMedia/RTSPCommon.cpp 2009-03-23 01:26:16 +0300
+++ live/liveMedia/RTSPCommon.cpp 2009-03-26 19:23:25 +0300
@@ -146,7 +146,7 @@
char const* fields = buf + 7;
while (*fields == ' ') ++fields;
double start, end;
- Locale l("C", LC_NUMERIC);
+ Locale l("C", LC_NUMERIC_MASK);
if (sscanf(fields, "npt = %lf - %lf", &start, &end) == 2) {
rangeStart = start;
rangeEnd = end;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment