Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
881d91f8
Commit
881d91f8
authored
Jan 25, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/xiph/OggFind: add parameter "synced"
parent
54d57fdc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
OggFind.cxx
src/lib/xiph/OggFind.cxx
+3
-2
OggFind.hxx
src/lib/xiph/OggFind.hxx
+4
-1
No files found.
src/lib/xiph/OggFind.cxx
View file @
881d91f8
...
@@ -57,13 +57,14 @@ OggSeekPageAtOffset(OggSyncState &oy, ogg_stream_state &os, InputStream &is,
...
@@ -57,13 +57,14 @@ OggSeekPageAtOffset(OggSyncState &oy, ogg_stream_state &os, InputStream &is,
bool
bool
OggSeekFindEOS
(
OggSyncState
&
oy
,
ogg_stream_state
&
os
,
ogg_packet
&
packet
,
OggSeekFindEOS
(
OggSyncState
&
oy
,
ogg_stream_state
&
os
,
ogg_packet
&
packet
,
InputStream
&
is
)
InputStream
&
is
,
bool
synced
)
{
{
if
(
!
is
.
KnownSize
())
if
(
!
is
.
KnownSize
())
return
false
;
return
false
;
if
(
is
.
GetRest
()
<
65536
)
if
(
is
.
GetRest
()
<
65536
)
return
OggFindEOS
(
oy
,
os
,
packet
);
return
(
synced
||
oy
.
ExpectPageSeekIn
(
os
))
&&
OggFindEOS
(
oy
,
os
,
packet
);
if
(
!
is
.
CheapSeeking
())
if
(
!
is
.
CheapSeeking
())
return
false
;
return
false
;
...
...
src/lib/xiph/OggFind.hxx
View file @
881d91f8
...
@@ -47,10 +47,13 @@ OggSeekPageAtOffset(OggSyncState &oy, ogg_stream_state &os, InputStream &is,
...
@@ -47,10 +47,13 @@ OggSeekPageAtOffset(OggSyncState &oy, ogg_stream_state &os, InputStream &is,
* Try to find the end-of-stream (EOS) packet. Seek to the end of the
* Try to find the end-of-stream (EOS) packet. Seek to the end of the
* file if necessary.
* file if necessary.
*
*
* @param synced is the #OggSyncState currently synced? If not, then
* we need to use ogg_sync_pageseek() instead of ogg_sync_pageout(),
* which is more expensive
* @return true if the EOS packet was found
* @return true if the EOS packet was found
*/
*/
bool
bool
OggSeekFindEOS
(
OggSyncState
&
oy
,
ogg_stream_state
&
os
,
ogg_packet
&
packet
,
OggSeekFindEOS
(
OggSyncState
&
oy
,
ogg_stream_state
&
os
,
ogg_packet
&
packet
,
InputStream
&
is
);
InputStream
&
is
,
bool
synced
=
true
);
#endif
#endif
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