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
2ba646a5
Commit
2ba646a5
authored
Oct 01, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/*: bunch of portability fixes.
parent
75a2edbf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
src/input/es_out.c
src/input/es_out.c
+7
-6
src/misc/httpd.c
src/misc/httpd.c
+1
-1
src/misc/modules.c
src/misc/modules.c
+8
-6
src/misc/net.c
src/misc/net.c
+3
-2
src/video_output/video_output.c
src/video_output/video_output.c
+6
-2
No files found.
src/input/es_out.c
View file @
2ba646a5
...
...
@@ -1073,14 +1073,13 @@ static char *LanguageGetName( const char *psz_code )
****************************************************************************/
static
void
EsOutAddInfo
(
es_out_t
*
out
,
es_out_id_t
*
es
)
{
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
es_format_t
*
fmt
=
&
es
->
fmt
;
char
psz_cat
[
strlen
(
_
(
"Stream %d"
))
+
12
];
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
es_format_t
*
fmt
=
&
es
->
fmt
;
char
*
psz_cat
;
/* Add stream info */
sprintf
(
psz_cat
,
_
(
"Stream %d"
),
out
->
p_sys
->
i_id
-
1
);
asprintf
(
&
psz_cat
,
_
(
"Stream %d"
),
out
->
p_sys
->
i_id
-
1
);
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Codec"
),
"%.4s"
,
(
char
*
)
&
fmt
->
i_codec
);
...
...
@@ -1138,4 +1137,6 @@ static void EsOutAddInfo( es_out_t *out, es_out_id_t *es )
default:
break
;
}
free
(
psz_cat
);
}
src/misc/httpd.c
View file @
2ba646a5
...
...
@@ -1108,7 +1108,7 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, char *psz_host, int i_port )
break
;
// success
socket_error:
c
lose
(
fd
);
net_C
lose
(
fd
);
fd
=
-
1
;
}
...
...
src/misc/modules.c
View file @
2ba646a5
...
...
@@ -763,21 +763,23 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir,
}
#if defined( UNDER_CE ) || defined( _MSC_VER )
#ifdef UNDER_CE
MultiByteToWideChar
(
CP_ACP
,
0
,
psz_dir
,
-
1
,
psz_wdir
,
MAX_PATH
);
rc
=
GetFileAttributes
(
psz_wdir
);
if
(
!
(
rc
&
FILE_ATTRIBUTE_DIRECTORY
)
)
{
/* Not a directory */
return
;
}
if
(
!
(
rc
&
FILE_ATTRIBUTE_DIRECTORY
)
)
return
;
/* Not a directory */
/* Parse all files in the directory */
#ifdef UNDER_CE
swprintf
(
psz_path
,
L"%s
\\
*.*"
,
psz_dir
);
#else
rc
=
GetFileAttributes
(
psz_dir
);
if
(
!
(
rc
&
FILE_ATTRIBUTE_DIRECTORY
)
)
return
;
/* Not a directory */
/* Parse all files in the directory */
sprintf
(
psz_path
,
"%s
\\
*.*"
,
psz_dir
);
#endif
handle
=
FindFirstFile
(
psz_path
,
&
finddata
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
{
...
...
src/misc/net.c
View file @
2ba646a5
...
...
@@ -53,6 +53,8 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 ) && !defined( UNDER_CE )
# include <io.h>
#endif
#include "network.h"
...
...
@@ -411,8 +413,7 @@ int __net_ReadNonBlock( vlc_object_t *p_this, int fd, uint8_t *p_data,
}
else
{
if
(
fd
==
STDIN_FILENO
)
i_recv
=
read
(
fd
,
p_data
,
i_data
);
else
if
(
fd
==
0
/*STDIN_FILENO*/
)
i_recv
=
read
(
fd
,
p_data
,
i_data
);
else
if
(
(
i_recv
=
recv
(
fd
,
p_data
,
i_data
,
0
)
)
<=
0
)
{
#ifdef WIN32
...
...
src/video_output/video_output.c
View file @
2ba646a5
...
...
@@ -1354,8 +1354,10 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd,
var_Get
(
p_input
,
"video-es"
,
&
val
);
if
(
val
.
i_int
>=
0
)
{
vlc_value_t
val_es
;
val_es
.
i_int
=
-
VIDEO_ES
;
p_vout
->
b_filter_change
=
VLC_TRUE
;
var_Set
(
p_input
,
"video-es"
,
(
vlc_value_t
)
-
VIDEO_ES
);
var_Set
(
p_input
,
"video-es"
,
val_es
);
var_Set
(
p_input
,
"video-es"
,
val
);
}
...
...
@@ -1386,8 +1388,10 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
var_Get
(
p_input
,
"video-es"
,
&
val
);
if
(
val
.
i_int
>=
0
)
{
vlc_value_t
val_es
;
val_es
.
i_int
=
-
VIDEO_ES
;
p_vout
->
b_filter_change
=
VLC_TRUE
;
var_Set
(
p_input
,
"video-es"
,
(
vlc_value_t
)
-
VIDEO_ES
);
var_Set
(
p_input
,
"video-es"
,
val_es
);
var_Set
(
p_input
,
"video-es"
,
val
);
}
...
...
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