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
208dbc5f
Commit
208dbc5f
authored
Aug 05, 2010
by
G Finch
Committed by
Ilkka Ollakka
Aug 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use-opriv-current-page-in-ogg.c
Signed-off-by:
Ilkka Ollakka
<
ileoo@videolan.org
>
parent
4654ab23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
modules/demux/ogg.c
modules/demux/ogg.c
+13
-14
No files found.
modules/demux/ogg.c
View file @
208dbc5f
...
...
@@ -215,7 +215,6 @@ static void Close( vlc_object_t *p_this )
static
int
Demux
(
demux_t
*
p_demux
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
ogg_page
oggpage
;
ogg_packet
oggpacket
;
int
i_stream
;
bool
b_skipping
=
false
;
...
...
@@ -263,11 +262,11 @@ static int Demux( demux_t * p_demux )
/*
* Demux an ogg page from the stream
*/
if
(
Ogg_ReadPage
(
p_demux
,
&
ogg
page
)
!=
VLC_SUCCESS
)
if
(
Ogg_ReadPage
(
p_demux
,
&
p_sys
->
current_
page
)
!=
VLC_SUCCESS
)
return
0
;
/* EOF */
/* Test for End of Stream */
if
(
ogg_page_eos
(
&
ogg
page
)
)
if
(
ogg_page_eos
(
&
p_sys
->
current_
page
)
)
p_sys
->
i_eos
++
;
}
...
...
@@ -280,10 +279,10 @@ static int Demux( demux_t * p_demux )
if
(
!
p_sys
->
b_page_waiting
)
{
if
(
p_sys
->
i_streams
==
1
&&
ogg_page_serialno
(
&
ogg
page
)
!=
p_stream
->
os
.
serialno
)
ogg_page_serialno
(
&
p_sys
->
current_
page
)
!=
p_stream
->
os
.
serialno
)
{
msg_Err
(
p_demux
,
"Broken Ogg stream (serialno) mismatch"
);
ogg_stream_reset_serialno
(
&
p_stream
->
os
,
ogg_page_serialno
(
&
ogg
page
)
);
ogg_stream_reset_serialno
(
&
p_stream
->
os
,
ogg_page_serialno
(
&
p_sys
->
current_
page
)
);
p_stream
->
b_reinit
=
true
;
p_stream
->
i_pcr
=
-
1
;
...
...
@@ -291,7 +290,7 @@ static int Demux( demux_t * p_demux )
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
}
if
(
ogg_stream_pagein
(
&
p_stream
->
os
,
&
ogg
page
)
!=
0
)
if
(
ogg_stream_pagein
(
&
p_stream
->
os
,
&
p_sys
->
current_
page
)
!=
0
)
{
continue
;
}
...
...
@@ -864,21 +863,21 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
{
demux_sys_t
*
p_ogg
=
p_demux
->
p_sys
;
ogg_packet
oggpacket
;
ogg_page
oggpage
;
int
i_stream
;
p_ogg
->
i_total_length
=
stream_Size
(
p_demux
->
s
);
msg_Dbg
(
p_demux
,
"File length is %"
PRId64
" bytes"
,
p_ogg
->
i_total_length
);
while
(
Ogg_ReadPage
(
p_demux
,
&
ogg
page
)
==
VLC_SUCCESS
)
while
(
Ogg_ReadPage
(
p_demux
,
&
p_ogg
->
current_
page
)
==
VLC_SUCCESS
)
{
if
(
ogg_page_bos
(
&
oggpage
)
)
if
(
ogg_page_bos
(
&
p_ogg
->
current_page
)
)
{
/* All is wonderful in our fine fine little world.
* We found the beginning of our first logical stream. */
while
(
ogg_page_bos
(
&
ogg
page
)
)
while
(
ogg_page_bos
(
&
p_ogg
->
current_
page
)
)
{
logical_stream_t
*
p_stream
;
...
...
@@ -901,12 +900,12 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
es_format_Init
(
&
p_stream
->
fmt_old
,
0
,
0
);
/* Setup the logical stream */
p_stream
->
i_serial_no
=
ogg_page_serialno
(
&
ogg
page
);
p_stream
->
i_serial_no
=
ogg_page_serialno
(
&
p_ogg
->
current_
page
);
ogg_stream_init
(
&
p_stream
->
os
,
p_stream
->
i_serial_no
);
/* Extract the initial header from the first page and verify
* the codec type of this Ogg bitstream */
if
(
ogg_stream_pagein
(
&
p_stream
->
os
,
&
ogg
page
)
<
0
)
if
(
ogg_stream_pagein
(
&
p_stream
->
os
,
&
p_ogg
->
current_
page
)
<
0
)
{
/* error. stream version mismatch perhaps */
msg_Err
(
p_demux
,
"error reading first page of "
...
...
@@ -1286,7 +1285,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
p_ogg
->
i_streams
--
;
}
if
(
Ogg_ReadPage
(
p_demux
,
&
ogg
page
)
!=
VLC_SUCCESS
)
if
(
Ogg_ReadPage
(
p_demux
,
&
p_ogg
->
current_
page
)
!=
VLC_SUCCESS
)
return
VLC_EGENERIC
;
}
...
...
@@ -1306,7 +1305,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
for
(
i_stream
=
0
;
i_stream
<
p_ogg
->
i_streams
;
i_stream
++
)
{
if
(
ogg_stream_pagein
(
&
p_ogg
->
pp_stream
[
i_stream
]
->
os
,
&
ogg
page
)
==
0
)
&
p_ogg
->
current_
page
)
==
0
)
{
p_ogg
->
b_page_waiting
=
true
;
break
;
...
...
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