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
d70d3a22
Commit
d70d3a22
authored
Jun 27, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/access/dvdread.c: titles and chapters start from 1.
parent
a7177d02
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
modules/access/dvdread.c
modules/access/dvdread.c
+16
-3
No files found.
modules/access/dvdread.c
View file @
d70d3a22
...
@@ -97,7 +97,7 @@ vlc_module_begin();
...
@@ -97,7 +97,7 @@ vlc_module_begin();
vlc_module_end
();
vlc_module_end
();
/* how many blocks DVDRead will read in each loop */
/* how many blocks DVDRead will read in each loop */
#define DVD_BLOCK_READ_ONCE
6
4
#define DVD_BLOCK_READ_ONCE 4
/*****************************************************************************
/*****************************************************************************
* Local prototypes
* Local prototypes
...
@@ -933,12 +933,13 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
...
@@ -933,12 +933,13 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
{
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
unsigned
int
i_tmp
;
unsigned
int
i_tmp
;
unsigned
int
i_chapter
=
0
;
unsigned
int
i_chapter
=
-
1
;
unsigned
int
i_cell
=
0
;
unsigned
int
i_cell
=
0
;
unsigned
int
i_vobu
=
0
;
unsigned
int
i_vobu
=
0
;
unsigned
int
i_sub_cell
=
0
;
unsigned
int
i_sub_cell
=
0
;
int
i_block
;
int
i_block
;
msg_Err
(
p_demux
,
"seek offset: %i"
,
i_block_offset
);
#define p_pgc p_sys->p_cur_pgc
#define p_pgc p_sys->p_cur_pgc
#define p_vts p_sys->p_vts_file
#define p_vts p_sys->p_vts_file
...
@@ -970,6 +971,13 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
...
@@ -970,6 +971,13 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
}
while
(
i_tmp
<=
i_cell
);
}
while
(
i_tmp
<=
i_cell
);
if
(
i_chapter
<
p_sys
->
i_chapters
&&
p_demux
->
info
.
i_seekpoint
!=
i_chapter
)
{
p_demux
->
info
.
i_update
|=
INPUT_UPDATE_SEEKPOINT
;
p_demux
->
info
.
i_seekpoint
=
i_chapter
;
}
/* Find vobu */
/* Find vobu */
while
(
p_vts
->
vts_vobu_admap
->
vobu_start_sectors
[
i_vobu
]
<=
i_block
)
while
(
p_vts
->
vts_vobu_admap
->
vobu_start_sectors
[
i_vobu
]
<=
i_block
)
{
{
...
@@ -986,7 +994,7 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
...
@@ -986,7 +994,7 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
#if 1
#if 1
msg_Dbg
(
p_demux
,
"cell %d i_sub_cell %d chapter %d vobu %d "
msg_Dbg
(
p_demux
,
"cell %d i_sub_cell %d chapter %d vobu %d "
"cell_sector %d vobu_sector %d sub_cell_sector %d"
,
"cell_sector %d vobu_sector %d sub_cell_sector %d"
,
i_cell
,
i_sub_cell
,
i_chapter
,
i_vobu
,
i_cell
,
i_sub_cell
,
i_chapter
,
i_vobu
,
p_sys
->
p_cur_pgc
->
cell_playback
[
i_cell
].
first_sector
,
p_sys
->
p_cur_pgc
->
cell_playback
[
i_cell
].
first_sector
,
p_vts
->
vts_vobu_admap
->
vobu_start_sectors
[
i_vobu
],
p_vts
->
vts_vobu_admap
->
vobu_start_sectors
[
i_vobu
],
p_vts
->
vts_c_adt
->
cell_adr_table
[
i_sub_cell
-
1
].
start_sector
);
p_vts
->
vts_c_adt
->
cell_adr_table
[
i_sub_cell
-
1
].
start_sector
);
...
@@ -1183,9 +1191,14 @@ static void DemuxTitles( demux_t *p_demux,
...
@@ -1183,9 +1191,14 @@ static void DemuxTitles( demux_t *p_demux,
msg_Dbg
(
p_demux
,
"title %d has %d chapters"
,
i
,
i_chapters
);
msg_Dbg
(
p_demux
,
"title %d has %d chapters"
,
i
,
i_chapters
);
t
=
vlc_input_title_New
();
t
=
vlc_input_title_New
();
t
->
psz_name
=
malloc
(
strlen
(
_
(
"Title %i"
)
)
+
20
);
sprintf
(
t
->
psz_name
,
_
(
"Title %i"
),
i
+
1
);
for
(
j
=
0
;
j
<
__MAX
(
i_chapters
,
1
);
j
++
)
for
(
j
=
0
;
j
<
__MAX
(
i_chapters
,
1
);
j
++
)
{
{
s
=
vlc_seekpoint_New
();
s
=
vlc_seekpoint_New
();
s
->
psz_name
=
malloc
(
strlen
(
_
(
"Chapter %i"
)
)
+
20
);
sprintf
(
s
->
psz_name
,
_
(
"Chapter %i"
),
j
+
1
);
TAB_APPEND
(
t
->
i_seekpoint
,
t
->
seekpoint
,
s
);
TAB_APPEND
(
t
->
i_seekpoint
,
t
->
seekpoint
,
s
);
}
}
...
...
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