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
c1f6ca1e
Commit
c1f6ca1e
authored
Jan 30, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ts: set psz_laguage with iso639 code.
parent
4c8e56e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
28 deletions
+8
-28
modules/demux/ts.c
modules/demux/ts.c
+8
-28
No files found.
modules/demux/ts.c
View file @
c1f6ca1e
...
...
@@ -2,7 +2,7 @@
* ts.c: Transport Stream input module for VLC.
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id: ts.c,v 1.
8 2004/01/25 20:05:28 hartman
Exp $
* $Id: ts.c,v 1.
9 2004/01/30 17:50:05 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -234,7 +234,6 @@ static inline int PIDGet( block_t *p )
}
static
vlc_bool_t
GatherPES
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
block_t
*
p_bk
);
static
char
*
LanguageNameISO639
(
char
*
p
);
static
iod_descriptor_t
*
IODNew
(
int
,
uint8_t
*
);
static
void
IODFree
(
iod_descriptor_t
*
);
...
...
@@ -1042,30 +1041,6 @@ static vlc_bool_t GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
return
i_ret
;
}
static
char
*
LanguageNameISO639
(
char
*
psz_code
)
{
const
iso639_lang_t
*
pl
;
pl
=
GetLang_2B
(
psz_code
);
if
(
!
strcmp
(
pl
->
psz_iso639_1
,
"??"
)
)
{
pl
=
GetLang_2T
(
psz_code
);
}
if
(
!
strcmp
(
pl
->
psz_iso639_1
,
"??"
)
)
{
return
strdup
(
psz_code
);
}
else
{
if
(
*
pl
->
psz_native_name
)
{
return
strdup
(
pl
->
psz_native_name
);
}
return
strdup
(
pl
->
psz_eng_name
);
}
}
static
int
PIDFillFormat
(
ts_pid_t
*
pid
,
int
i_stream_type
)
{
es_format_t
*
fmt
=
&
pid
->
es
->
fmt
;
...
...
@@ -1726,8 +1701,13 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
if
(
p_dr
)
{
dvbpsi_iso639_dr_t
*
p_decoded
=
dvbpsi_DecodeISO639Dr
(
p_dr
);
pid
->
es
->
fmt
.
psz_language
=
LanguageNameISO639
(
(
char
*
)
&
p_decoded
->
i_iso_639_code
);
if
(
p_decoded
)
{
pid
->
es
->
fmt
.
psz_language
=
malloc
(
4
);
memcpy
(
pid
->
es
->
fmt
.
psz_language
,
p_decoded
->
i_iso_639_code
,
3
);
pid
->
es
->
fmt
.
psz_language
[
3
]
=
0
;
}
}
}
...
...
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