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
21a96468
Commit
21a96468
authored
Jul 02, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics (replace defines by pointers)
parent
0bac0634
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+19
-20
No files found.
modules/demux/asf/libasf.c
View file @
21a96468
...
@@ -623,43 +623,42 @@ static int ASF_ReadObject_codec_list( stream_t *s, asf_object_t *p_obj )
...
@@ -623,43 +623,42 @@ static int ASF_ReadObject_codec_list( stream_t *s, asf_object_t *p_obj )
p_data
=
p_peek
+
44
;
p_data
=
p_peek
+
44
;
for
(
i_codec
=
0
;
i_codec
<
p_cl
->
i_codec_entries_count
;
i_codec
++
)
for
(
i_codec
=
0
;
i_codec
<
p_cl
->
i_codec_entries_count
;
i_codec
++
)
{
{
#define codec p_cl->codec[i_codec]
asf_codec_entry_t
*
p_codec
=
&
p_cl
->
codec
[
i_codec
];
int
i_len
,
i
;
int
i_len
,
i
;
codec
.
i_type
=
GetWLE
(
p_data
);
p_data
+=
2
;
p_codec
->
i_type
=
GetWLE
(
p_data
);
p_data
+=
2
;
/* codec name */
/* codec name */
i_len
=
GetWLE
(
p_data
);
p_data
+=
2
;
i_len
=
GetWLE
(
p_data
);
p_data
+=
2
;
codec
.
psz_name
=
calloc
(
i_len
+
1
,
sizeof
(
char
)
);
p_codec
->
psz_name
=
calloc
(
i_len
+
1
,
sizeof
(
char
)
);
for
(
i
=
0
;
i
<
i_len
;
i
++
)
for
(
i
=
0
;
i
<
i_len
;
i
++
)
{
{
codec
.
psz_name
[
i
]
=
GetWLE
(
p_data
+
2
*
i
);
p_codec
->
psz_name
[
i
]
=
GetWLE
(
p_data
+
2
*
i
);
}
}
codec
.
psz_name
[
i_len
]
=
'\0'
;
p_codec
->
psz_name
[
i_len
]
=
'\0'
;
p_data
+=
2
*
i_len
;
p_data
+=
2
*
i_len
;
/* description */
/* description */
i_len
=
GetWLE
(
p_data
);
p_data
+=
2
;
i_len
=
GetWLE
(
p_data
);
p_data
+=
2
;
codec
.
psz_description
=
calloc
(
i_len
+
1
,
sizeof
(
char
)
);
p_codec
->
psz_description
=
calloc
(
i_len
+
1
,
sizeof
(
char
)
);
for
(
i
=
0
;
i
<
i_len
;
i
++
)
for
(
i
=
0
;
i
<
i_len
;
i
++
)
{
{
codec
.
psz_description
[
i
]
=
GetWLE
(
p_data
+
2
*
i
);
p_codec
->
psz_description
[
i
]
=
GetWLE
(
p_data
+
2
*
i
);
}
}
codec
.
psz_description
[
i_len
]
=
'\0'
;
p_codec
->
psz_description
[
i_len
]
=
'\0'
;
p_data
+=
2
*
i_len
;
p_data
+=
2
*
i_len
;
/* opaque information */
/* opaque information */
codec
.
i_information_length
=
GetWLE
(
p_data
);
p_data
+=
2
;
p_codec
->
i_information_length
=
GetWLE
(
p_data
);
p_data
+=
2
;
if
(
codec
.
i_information_length
>
0
)
if
(
p_codec
->
i_information_length
>
0
)
{
{
codec
.
p_information
=
malloc
(
codec
.
i_information_length
);
p_codec
->
p_information
=
malloc
(
p_codec
->
i_information_length
);
memcpy
(
codec
.
p_information
,
p_data
,
codec
.
i_information_length
);
memcpy
(
p_codec
->
p_information
,
p_data
,
p_codec
->
i_information_length
);
p_data
+=
codec
.
i_information_length
;
p_data
+=
p_codec
->
i_information_length
;
}
}
else
else
{
{
codec
.
p_information
=
NULL
;
p_codec
->
p_information
=
NULL
;
}
}
#undef codec
}
}
}
}
else
else
...
@@ -696,11 +695,11 @@ static void ASF_FreeObject_codec_list( asf_object_t *p_obj )
...
@@ -696,11 +695,11 @@ static void ASF_FreeObject_codec_list( asf_object_t *p_obj )
for
(
i_codec
=
0
;
i_codec
<
p_cl
->
i_codec_entries_count
;
i_codec
++
)
for
(
i_codec
=
0
;
i_codec
<
p_cl
->
i_codec_entries_count
;
i_codec
++
)
{
{
#define codec p_cl->codec[i_codec]
asf_codec_entry_t
*
p_codec
=
&
p_cl
->
codec
[
i_codec
];
FREENULL
(
codec
.
psz_name
);
FREENULL
(
codec
.
psz_description
);
FREENULL
(
p_codec
->
psz_name
);
FREENULL
(
codec
.
p_informa
tion
);
FREENULL
(
p_codec
->
psz_descrip
tion
);
#undef codec
FREENULL
(
p_codec
->
p_information
);
}
}
FREENULL
(
p_cl
->
codec
);
FREENULL
(
p_cl
->
codec
);
}
}
...
...
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