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
899f3795
Commit
899f3795
authored
Mar 03, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ogg: fix seeking bounds search
Might not have found lowest granule for vorbis/opus like codecs.
parent
e723b4fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
modules/demux/oggseek.c
modules/demux/oggseek.c
+18
-4
No files found.
modules/demux/oggseek.c
View file @
899f3795
...
...
@@ -859,7 +859,8 @@ static int64_t OggBisectSearchByTime( demux_t *p_demux, logical_stream_t *p_stre
int64_t
i_timestamp
;
int64_t
i_granule
;
}
bestlower
=
{
p_stream
->
i_data_start
,
-
1
,
-
1
},
current
=
{
-
1
,
-
1
,
-
1
};
current
=
{
-
1
,
-
1
,
-
1
},
lowestupper
=
{
-
1
,
-
1
,
-
1
};
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
...
...
@@ -905,6 +906,10 @@ static int64_t OggBisectSearchByTime( demux_t *p_demux, logical_stream_t *p_stre
msg_Err
(
p_demux
,
"Unmatched granule. New codec ?"
);
return
-
1
;
}
else
if
(
current
.
i_timestamp
<
-
1
)
/* due to preskip with some codecs */
{
current
.
i_timestamp
=
0
;
}
if
(
current
.
i_pos
!=
-
1
&&
current
.
i_granule
!=
-
1
)
{
...
...
@@ -919,6 +924,8 @@ static int64_t OggBisectSearchByTime( demux_t *p_demux, logical_stream_t *p_stre
}
else
if
(
current
.
i_timestamp
>
i_targettime
)
{
if
(
lowestupper
.
i_timestamp
==
-
1
||
current
.
i_timestamp
<
lowestupper
.
i_timestamp
)
lowestupper
=
current
;
/* check lower half of segment */
i_start_pos
-=
i_segsize
;
i_end_pos
-=
i_segsize
;
...
...
@@ -931,15 +938,22 @@ static int64_t OggBisectSearchByTime( demux_t *p_demux, logical_stream_t *p_stre
i_start_pos
-=
i_segsize
;
}
OggDebug
(
msg_Dbg
(
p_demux
,
"Bisect restart i_segsize=%"
PRId64
" between %"
PRId64
" and %"
PRId64
,
i_segsize
,
i_start_pos
,
i_end_pos
)
);
OggDebug
(
msg_Dbg
(
p_demux
,
"Bisect restart i_segsize=%"
PRId64
" between %"
PRId64
" and %"
PRId64
" bl %"
PRId64
" lu %"
PRId64
,
i_segsize
,
i_start_pos
,
i_end_pos
,
bestlower
.
i_granule
,
lowestupper
.
i_granule
)
);
i_segsize
=
(
i_end_pos
-
i_start_pos
+
1
)
>>
1
;
i_start_pos
+=
i_segsize
;
}
while
(
i_segsize
>
64
);
if
(
bestlower
.
i_granule
==
-
1
)
return
-
1
;
if
(
bestlower
.
i_granule
==
-
1
)
{
if
(
lowestupper
.
i_granule
==
-
1
)
return
-
1
;
else
bestlower
=
lowestupper
;
}
if
(
p_stream
->
b_oggds
)
{
...
...
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