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
23ca8078
Commit
23ca8078
authored
Feb 06, 2014
by
Petri Hintukainen
Committed by
Rémi Denis-Courmont
Feb 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluray: set audio/spu stream languages
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
4b5b89cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
modules/access/bluray.c
modules/access/bluray.c
+25
-0
No files found.
modules/access/bluray.c
View file @
23ca8078
...
...
@@ -507,11 +507,29 @@ static int findEsPairIndexByEs(demux_sys_t *p_sys, es_out_id_t *p_es)
return
-
1
;
}
static
void
setStreamLang
(
es_format_t
*
p_fmt
,
const
BLURAY_STREAM_INFO
*
p_streams
,
int
i_stream_count
)
{
for
(
int
i
=
0
;
i
<
i_stream_count
;
i
++
)
{
if
(
p_fmt
->
i_id
==
p_streams
[
i
].
pid
)
{
free
(
p_fmt
->
psz_language
);
p_fmt
->
psz_language
=
strndup
(
p_streams
[
i
].
lang
,
3
);
return
;
}
}
}
static
es_out_id_t
*
esOutAdd
(
es_out_t
*
p_out
,
const
es_format_t
*
p_fmt
)
{
demux_sys_t
*
p_sys
=
p_out
->
p_sys
->
p_demux
->
p_sys
;
BLURAY_TITLE_INFO
*
title_info
=
bd_get_playlist_info
(
p_sys
->
bluray
,
p_sys
->
i_playlist
,
0
);
BLURAY_CLIP_INFO
*
clip_info
=
NULL
;
es_format_t
fmt
;
if
(
title_info
&&
p_sys
->
i_current_clip
<
title_info
->
clip_count
)
{
clip_info
=
&
title_info
->
clips
[
p_sys
->
i_current_clip
];
}
es_format_Copy
(
&
fmt
,
p_fmt
);
switch
(
fmt
.
i_cat
)
{
case
VIDEO_ES
:
...
...
@@ -521,11 +539,18 @@ static es_out_id_t *esOutAdd(es_out_t *p_out, const es_format_t *p_fmt)
case
AUDIO_ES
:
if
(
p_sys
->
i_audio_stream
!=
-
1
&&
p_sys
->
i_audio_stream
!=
p_fmt
->
i_id
)
fmt
.
i_priority
=
ES_PRIORITY_NOT_SELECTABLE
;
if
(
clip_info
)
setStreamLang
(
&
fmt
,
clip_info
->
audio_streams
,
clip_info
->
audio_stream_count
);
break
;
case
SPU_ES
:
if
(
clip_info
)
setStreamLang
(
&
fmt
,
clip_info
->
pg_streams
,
clip_info
->
pg_stream_count
);
break
;
}
if
(
title_info
)
bd_free_title_info
(
title_info
);
es_out_id_t
*
p_es
=
es_out_Add
(
p_out
->
p_sys
->
p_demux
->
out
,
&
fmt
);
if
(
p_fmt
->
i_id
>=
0
)
{
/* Ensure we are not overriding anything */
...
...
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