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
88d30061
Commit
88d30061
authored
Feb 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
es_format_t: make i_extra_languages unsigned
parent
f5235164
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
include/vlc_es.h
include/vlc_es.h
+1
-1
modules/demux/ts.c
modules/demux/ts.c
+1
-1
src/misc/es_format.c
src/misc/es_format.c
+5
-10
No files found.
include/vlc_es.h
View file @
88d30061
...
...
@@ -401,7 +401,7 @@ struct es_format_t
char
*
psz_language
;
/**< human readible language name */
char
*
psz_description
;
/**< human readible description of language */
int
i_extra_languages
;
/**< length in bytes of extra language data pointer */
unsigned
i_extra_languages
;
/**< length in bytes of extra language data pointer */
extra_languages_t
*
p_extra_languages
;
/**< extra language data needed by some decoders */
audio_format_t
audio
;
/**< description of audio format */
...
...
modules/demux/ts.c
View file @
88d30061
...
...
@@ -4843,7 +4843,7 @@ static void PMTParseEsIso639( demux_t *p_demux, ts_pid_t *pid,
pid
->
es
->
fmt
.
i_extra_languages
);
if
(
pid
->
es
->
fmt
.
p_extra_languages
)
{
for
(
int
i
=
0
;
i
<
pid
->
es
->
fmt
.
i_extra_languages
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
pid
->
es
->
fmt
.
i_extra_languages
;
i
++
)
{
pid
->
es
->
fmt
.
p_extra_languages
[
i
].
psz_language
=
malloc
(
4
);
if
(
pid
->
es
->
fmt
.
p_extra_languages
[
i
].
psz_language
)
...
...
src/misc/es_format.c
View file @
88d30061
...
...
@@ -457,7 +457,6 @@ void es_format_InitFromVideo( es_format_t *p_es, const video_format_t *p_fmt )
int
es_format_Copy
(
es_format_t
*
dst
,
const
es_format_t
*
src
)
{
int
i
;
memcpy
(
dst
,
src
,
sizeof
(
es_format_t
)
);
dst
->
psz_language
=
src
->
psz_language
?
strdup
(
src
->
psz_language
)
:
NULL
;
dst
->
psz_description
=
src
->
psz_description
?
strdup
(
src
->
psz_description
)
:
NULL
;
...
...
@@ -497,7 +496,7 @@ int es_format_Copy( es_format_t *dst, const es_format_t *src )
malloc
(
dst
->
i_extra_languages
*
sizeof
(
*
dst
->
p_extra_languages
));
if
(
dst
->
p_extra_languages
)
{
for
(
i
=
0
;
i
<
dst
->
i_extra_languages
;
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
dst
->
i_extra_languages
;
i
++
)
{
if
(
src
->
p_extra_languages
[
i
].
psz_language
)
dst
->
p_extra_languages
[
i
].
psz_language
=
strdup
(
src
->
p_extra_languages
[
i
].
psz_language
);
else
...
...
@@ -528,16 +527,12 @@ void es_format_Clean( es_format_t *fmt )
if
(
fmt
->
subs
.
p_style
)
text_style_Delete
(
fmt
->
subs
.
p_style
);
if
(
fmt
->
i_extra_languages
>
0
&&
fmt
->
p_extra_languages
)
for
(
unsigned
i
=
0
;
i
<
fmt
->
i_extra_languages
;
i
++
)
{
int
i
;
for
(
i
=
0
;
i
<
fmt
->
i_extra_languages
;
i
++
)
{
free
(
fmt
->
p_extra_languages
[
i
].
psz_language
);
free
(
fmt
->
p_extra_languages
[
i
].
psz_description
);
}
free
(
fmt
->
p_extra_languages
);
free
(
fmt
->
p_extra_languages
[
i
].
psz_language
);
free
(
fmt
->
p_extra_languages
[
i
].
psz_description
);
}
free
(
fmt
->
p_extra_languages
);
/* es_format_Clean can be called multiple times */
memset
(
fmt
,
0
,
sizeof
(
*
fmt
)
);
...
...
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