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
26db27e0
Commit
26db27e0
authored
Mar 02, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MMS: add an error message if
UTF-16
conversion fails
Server rejects connection if some field are not set properly
parent
d843a2fc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
modules/access/mms/buffer.c
modules/access/mms/buffer.c
+5
-1
modules/access/mms/buffer.h
modules/access/mms/buffer.h
+1
-1
modules/access/mms/mmstu.c
modules/access/mms/mmstu.c
+3
-3
No files found.
modules/access/mms/buffer.c
View file @
26db27e0
...
...
@@ -30,6 +30,7 @@
#endif
#include <vlc_common.h>
#include <vlc_access.h>
#include <vlc_charset.h>
#include "asf.h"
...
...
@@ -106,7 +107,7 @@ void var_buffer_addmemory( var_buffer_t *p_buf, void *p_mem, int i_mem )
p_buf
->
i_data
+=
i_mem
;
}
void
var_buffer_addUTF16
(
var_buffer_t
*
p_buf
,
const
char
*
p_str
)
void
var_buffer_addUTF16
(
access_t
*
p_access
,
var_buffer_t
*
p_buf
,
const
char
*
p_str
)
{
uint16_t
*
p_out
;
size_t
i_out
;
...
...
@@ -120,7 +121,10 @@ void var_buffer_addUTF16( var_buffer_t *p_buf, const char *p_str )
else
p_out
=
NULL
;
if
(
p_out
==
NULL
)
{
msg_Err
(
p_access
,
"UTF-16 conversion failed"
);
i_out
=
0
;
}
i_out
/=
2
;
for
(
size_t
i
=
0
;
i
<
i_out
;
i
++
)
...
...
modules/access/mms/buffer.h
View file @
26db27e0
...
...
@@ -43,7 +43,7 @@ void var_buffer_add16( var_buffer_t *p_buf, uint16_t i_word );
void
var_buffer_add32
(
var_buffer_t
*
p_buf
,
uint32_t
i_word
);
void
var_buffer_add64
(
var_buffer_t
*
p_buf
,
uint64_t
i_word
);
void
var_buffer_addmemory
(
var_buffer_t
*
p_buf
,
void
*
p_mem
,
int
i_mem
);
void
var_buffer_addUTF16
(
var_buffer_t
*
p_buf
,
const
char
*
p_str
);
void
var_buffer_addUTF16
(
access_t
*
p_access
,
var_buffer_t
*
p_buf
,
const
char
*
p_str
);
void
var_buffer_free
(
var_buffer_t
*
p_buf
);
...
...
modules/access/mms/mmstu.c
View file @
26db27e0
...
...
@@ -536,7 +536,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
"NSPlayer/7.0.0.1956; {"
GUID_FMT
"}; Host: %s"
,
GUID_PRINT
(
p_sys
->
guid
),
p_url
->
psz_host
);
var_buffer_addUTF16
(
&
buffer
,
tmp
);
var_buffer_addUTF16
(
p_access
,
&
buffer
,
tmp
);
mms_CommandSend
(
p_access
,
0x01
,
/* connexion request */
...
...
@@ -598,7 +598,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
{
sprintf
(
tmp
,
"
\\\\
192.168.0.1
\\
TCP
\\
1242"
);
}
var_buffer_addUTF16
(
&
buffer
,
tmp
);
var_buffer_addUTF16
(
p_access
,
&
buffer
,
tmp
);
var_buffer_add16
(
&
buffer
,
'0'
);
mms_CommandSend
(
p_access
,
...
...
@@ -633,7 +633,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
{
mediapath
++
;
}
var_buffer_addUTF16
(
&
buffer
,
mediapath
);
var_buffer_addUTF16
(
p_access
,
&
buffer
,
mediapath
);
mms_CommandSend
(
p_access
,
0x05
,
...
...
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