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
694f1911
Commit
694f1911
authored
Mar 08, 2012
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Mar 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bluray: Hack to avoid crashing when changing title.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
17f7243a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
modules/access/bluray.c
modules/access/bluray.c
+22
-2
No files found.
modules/access/bluray.c
View file @
694f1911
...
@@ -310,8 +310,29 @@ static int blurayInitTitles(demux_t *p_demux )
...
@@ -310,8 +310,29 @@ static int blurayInitTitles(demux_t *p_demux )
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
static
void
blurayResetParser
(
demux_t
*
p_demux
)
{
/*
* This is a hack and will have to be removed.
* The parser should be flushed, and not destroy/created each time
* we are changing title.
*/
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
!
p_sys
->
p_parser
)
return
;
stream_Delete
(
p_sys
->
p_parser
);
p_sys
->
p_parser
=
stream_DemuxNew
(
p_demux
,
"ts"
,
p_demux
->
out
);
if
(
!
p_sys
->
p_parser
)
{
msg_Err
(
p_demux
,
"Failed to create TS demuxer"
);
}
}
static
void
blurayUpdateTitle
(
demux_t
*
p_demux
,
int
i_title
)
static
void
blurayUpdateTitle
(
demux_t
*
p_demux
,
int
i_title
)
{
{
blurayResetParser
(
p_demux
);
if
(
i_title
>=
p_demux
->
p_sys
->
i_title
)
return
;
/* read title info and init some values */
/* read title info and init some values */
p_demux
->
info
.
i_title
=
i_title
;
p_demux
->
info
.
i_title
=
i_title
;
p_demux
->
info
.
i_seekpoint
=
0
;
p_demux
->
info
.
i_seekpoint
=
0
;
...
@@ -483,7 +504,6 @@ static void blurayHandleEvent( demux_t *p_demux, const BD_EVENT *e )
...
@@ -483,7 +504,6 @@ static void blurayHandleEvent( demux_t *p_demux, const BD_EVENT *e )
switch
(
e
->
event
)
switch
(
e
->
event
)
{
{
case
BD_EVENT_TITLE
:
case
BD_EVENT_TITLE
:
if
(
e
->
param
<
p_sys
->
i_title
)
blurayUpdateTitle
(
p_demux
,
e
->
param
);
blurayUpdateTitle
(
p_demux
,
e
->
param
);
break
;
break
;
case
BD_EVENT_PLAYITEM
:
case
BD_EVENT_PLAYITEM
:
...
...
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