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
ed42e1e2
Commit
ed42e1e2
authored
Feb 10, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TS Mux: generate lang array directly in the needed format
parent
ca66eeb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
20 deletions
+11
-20
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+11
-20
No files found.
modules/mux/mpeg/ts.c
View file @
ed42e1e2
...
@@ -1019,8 +1019,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
...
@@ -1019,8 +1019,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
p_stream
->
i_langs
=
1
+
p_input
->
p_fmt
->
i_extra_languages
;
p_stream
->
i_langs
=
1
+
p_input
->
p_fmt
->
i_extra_languages
;
p_stream
->
lang
=
calloc
(
1
,
p_stream
->
i_langs
*
3
);
p_stream
->
lang
=
calloc
(
1
,
p_stream
->
i_langs
*
4
);
if
(
!
p_stream
->
lang
)
if
(
!
p_stream
->
lang
)
{
{
free
(
p_stream
);
free
(
p_stream
);
...
@@ -1041,8 +1041,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
...
@@ -1041,8 +1041,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
const
char
*
code
=
GetIso639_2LangCode
(
lang
);
const
char
*
code
=
GetIso639_2LangCode
(
lang
);
if
(
*
code
)
if
(
*
code
)
{
{
memcpy
(
&
p_stream
->
lang
[
i
*
3
],
code
,
3
);
memcpy
(
&
p_stream
->
lang
[
i
*
4
],
code
,
3
);
msg_Dbg
(
p_mux
,
" - lang=%3.3s"
,
&
p_stream
->
lang
[
i
*
3
]
);
p_stream
->
lang
[
i
*
4
+
3
]
=
0x00
;
/* audio type: 0x00 undefined */
msg_Dbg
(
p_mux
,
" - lang=%3.3s"
,
&
p_stream
->
lang
[
i
*
4
]
);
}
}
}
}
...
@@ -2397,20 +2398,10 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
...
@@ -2397,20 +2398,10 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
continue
;
continue
;
}
}
if
(
p_stream
->
lang
[
0
]
!=
0
)
if
(
p_stream
->
i_langs
)
{
{
uint8_t
data
[
4
*
p_stream
->
i_langs
];
dvbpsi_PMTESAddDescriptor
(
p_es
,
0x0a
,
4
*
p_stream
->
i_langs
,
p_stream
->
lang
);
/* I construct the content myself, way faster than looking at
* over complicated/mind broken libdvbpsi way */
for
(
int
i
=
0
;
i
<
p_stream
->
i_langs
;
i
++
)
{
data
[
i
*
4
+
0
]
=
p_stream
->
lang
[
i
*
3
+
0
];
data
[
i
*
4
+
1
]
=
p_stream
->
lang
[
i
*
3
+
1
];
data
[
i
*
4
+
2
]
=
p_stream
->
lang
[
i
*
3
+
2
];
data
[
i
*
4
+
3
]
=
0x00
;
/* audio type: 0x00 undefined */
}
dvbpsi_PMTESAddDescriptor
(
p_es
,
0x0a
,
4
*
p_stream
->
i_langs
,
data
);
}
}
}
}
...
...
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