Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b760414f
Commit
b760414f
authored
Apr 28, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contrib: Attempt to fix live555 patches.
parent
b277fbfb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
74 deletions
+22
-74
extras/contrib/src/Patches/live-starttime.patch
extras/contrib/src/Patches/live-starttime.patch
+5
-7
extras/contrib/src/Patches/live.patch
extras/contrib/src/Patches/live.patch
+17
-67
No files found.
extras/contrib/src/Patches/live-starttime.patch
View file @
b760414f
...
...
@@ -158,15 +158,13 @@ diff -ruN live.orig/liveMedia/include/RTSPClient.hh live/liveMedia/include/RTSPC
Boolean parseGetParameterHeader(char const* line,
const char* param,
char*& value);
--- live/liveMedia/include/liveMedia_version.hh 2007-02-20 12:33:45.000000000 +0100
+++ live.new/liveMedia/include/liveMedia_version.hh 2007-03-19 22:06:23.000000000 +0100
@@ -4,7 +4,7 @@
#ifndef _LIVEMEDIA_VERSION_HH
--- live/liveMedia/include/liveMedia_version.hh.orig 2007-04-24 11:38:22.000000000 +0200
+++ live/liveMedia/include/liveMedia_version.hh 2007-04-28 14:06:50.000000000 +0200
@@ -5,6 +5,6 @@
#define _LIVEMEDIA_VERSION_HH
-#define LIVEMEDIA_LIBRARY_VERSION_STRING "2007.04.20"
-#define LIVEMEDIA_LIBRARY_VERSION_INT 1177027200
+#define LIVEMEDIA_LIBRARY_VERSION_STRING "2007.03.19"
#define LIVEMEDIA_LIBRARY_VERSION_STRING "2007.04.24"
-#define LIVEMEDIA_LIBRARY_VERSION_INT 1177372800
+#define LIVEMEDIA_LIBRARY_VERSION_INT 9999999999
#endif
extras/contrib/src/Patches/live.patch
View file @
b760414f
...
...
@@ -22,64 +22,13 @@ diff -ru live/groupsock/NetInterface.cpp live-patched/groupsock/NetInterface.cpp
#endif
////////// NetInterface //////////
--- live/liveMedia/RTSPClient.cpp 2005-10-28 18:54:17.000000000 +0200
+++ live-patched/liveMedia/RTSPClient.cpp 2005-10-28 22:04:54.000000000 +0200
@@ -32,40 +32,47 @@
#define _strncasecmp strncasecmp
#endif
-// Experimental support for temporarily setting the locale (e.g., to POSIX,
-// for parsing or printing floating-point numbers in protocol headers).
-#ifdef USE_LOCALE
#include <locale.h>
-#else
-#ifndef LC_NUMERIC
-#define LC_NUMERIC 0
-#endif
-#endif
+#include <stdarg.h>
-class Locale {
-public:
- Locale(char const* newLocale, int category = LC_NUMERIC)
- : fCategory(category) {
-#ifdef USE_LOCALE
- fPrevLocale = strDup(setlocale(category, NULL));
- setlocale(category, newLocale);
-#endif
- }
+/* Radix safe (always uses .) printf and friends */
+int radix_safe_sprintf( char *str, const char *format, ...)
+{
+ va_list args;
+ int result = 0;
+ char *locale = NULL;
- virtual ~Locale() {
-#ifdef USE_LOCALE
- if (fPrevLocale != NULL) {
- setlocale(fCategory, fPrevLocale);
- delete[] fPrevLocale;
- }
-#endif
- }
+ locale = strDup( setlocale( LC_NUMERIC, NULL ) );
+ setlocale( LC_NUMERIC, "C" );
+
+ va_start( args, format );
+ result = vsprintf(str, format, args );
+ va_end( args );
-private:
- int fCategory;
- char* fPrevLocale;
-};
+ setlocale( LC_NUMERIC, locale );
+ delete[] locale;
--- live/liveMedia/RTSPClient.cpp.orig 2007-04-24 11:38:22.000000000 +0200
+++ live/liveMedia/RTSPClient.cpp 2007-04-28 14:01:53.000000000 +0200
@@ -28,6 +28,25 @@
#include "../RealRTSP/include/RealRTSP.hh"
#endif
+ return result;
+}
+
+int radix_safe_sscanf( const char *str, const char *format, ...)
+{
+ va_list args;
...
...
@@ -98,39 +47,40 @@ diff -ru live/groupsock/NetInterface.cpp live-patched/groupsock/NetInterface.cpp
+
+ return result;
+}
+
////////// RTSPClient //////////
@@ -948,8 +955,7 @@
RTSPClient* RTSPClient::createNew(UsageEnvironment& env,
@@ -989,8 +1008,7 @@
// This is the default value; we don't need a "Scale:" header:
buf[0] = '\0';
} else {
- Locale("POSIX");
- Locale("POSIX"
, LC_NUMERIC
);
- sprintf(buf, "Scale: %f\r\n", scale);
+ radix_safe_sprintf(buf, "Scale: %f\r\n", scale);
}
return strDup(buf);
@@ -
962,12 +968
,10 @@
@@ -
1003,12 +1021
,10 @@
buf[0] = '\0';
} else if (end < 0) {
// There's no end time:
- Locale("POSIX");
- Locale("POSIX"
, LC_NUMERIC
);
- sprintf(buf, "Range: npt=%.3f-\r\n", start);
+ radix_safe_sprintf(buf, "Range: npt=%.3f-
\r\n", start
);
+ radix_safe_sprintf(buf, "Range: npt=%.3f-
%.3f\r\n", start, end
);
} else {
// There's both a start and an end time; include them both in the "Range:" hdr
- Locale("POSIX");
- Locale("POSIX"
, LC_NUMERIC
);
- sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
+ radix_safe_sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
}
return strDup(buf);
@@ -2
153,8 +2157
,7 @@
@@ -2
246,8 +2262
,7 @@
if (_strncasecmp(line, "Scale: ", 7) != 0) return False;
line += 7;
- Locale("POSIX");
- Locale("POSIX"
, LC_NUMERIC
);
- return sscanf(line, "%f", &scale) == 1;
+ return radix_safe_sscanf(line, "%f", &scale) == 1;
}
...
...
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