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
cddfefc8
Commit
cddfefc8
authored
Jan 10, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASF: macro removal
parent
764b674d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+13
-14
No files found.
modules/demux/asf/libasf.c
View file @
cddfefc8
...
@@ -700,6 +700,14 @@ static void ASF_FreeObject_codec_list( asf_object_t *p_obj )
...
@@ -700,6 +700,14 @@ static void ASF_FreeObject_codec_list( asf_object_t *p_obj )
FREENULL
(
p_cl
->
codec
);
FREENULL
(
p_cl
->
codec
);
}
}
static
inline
char
*
get_wstring
(
const
uint8_t
*
p_data
,
size_t
i_size
)
{
char
*
psz_str
=
FromCharset
(
"UTF-16LE"
,
p_data
,
i_size
);
if
(
psz_str
)
p_data
+=
i_size
;
return
psz_str
;
}
/* Microsoft should go to hell. This time the length give number of bytes
/* Microsoft should go to hell. This time the length give number of bytes
* and for the some others object, length give char16 count ... */
* and for the some others object, length give char16 count ... */
static
int
ASF_ReadObject_content_description
(
stream_t
*
s
,
asf_object_t
*
p_obj
)
static
int
ASF_ReadObject_content_description
(
stream_t
*
s
,
asf_object_t
*
p_obj
)
...
@@ -711,13 +719,6 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj)
...
@@ -711,13 +719,6 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj)
if
(
(
i_peek
=
stream_Peek
(
s
,
&
p_peek
,
p_cd
->
i_object_size
)
)
<
34
)
if
(
(
i_peek
=
stream_Peek
(
s
,
&
p_peek
,
p_cd
->
i_object_size
)
)
<
34
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
/* FIXME i_size*3 is the worst case. */
#define GETSTRINGW( psz_str, i_size ) do { \
psz_str = FromCharset( "UTF-16LE", p_data, i_size ); \
if( psz_str ) { \
p_data += i_size; \
} } while(0)
p_data
=
p_peek
+
24
;
p_data
=
p_peek
+
24
;
i_title
=
ASF_READ2
();
i_title
=
ASF_READ2
();
...
@@ -729,13 +730,11 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj)
...
@@ -729,13 +730,11 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj)
if
(
!
ASF_HAVE
(
i_title
+
i_artist
+
i_copyright
+
i_description
+
i_rating
)
)
if
(
!
ASF_HAVE
(
i_title
+
i_artist
+
i_copyright
+
i_description
+
i_rating
)
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
GETSTRINGW
(
p_cd
->
psz_title
,
i_title
);
p_cd
->
psz_title
=
get_wstring
(
p_data
,
i_title
);
GETSTRINGW
(
p_cd
->
psz_artist
,
i_artist
);
p_cd
->
psz_artist
=
get_wstring
(
p_data
,
i_artist
);
GETSTRINGW
(
p_cd
->
psz_copyright
,
i_copyright
);
p_cd
->
psz_copyright
=
get_wstring
(
p_data
,
i_copyright
);
GETSTRINGW
(
p_cd
->
psz_description
,
i_description
);
p_cd
->
psz_description
=
get_wstring
(
p_data
,
i_description
);
GETSTRINGW
(
p_cd
->
psz_rating
,
i_rating
);
p_cd
->
psz_rating
=
get_wstring
(
p_data
,
i_rating
);
#undef GETSTRINGW
#ifdef ASF_DEBUG
#ifdef ASF_DEBUG
msg_Dbg
(
s
,
msg_Dbg
(
s
,
...
...
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