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
5b7ac4ad
Commit
5b7ac4ad
authored
Jan 14, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ogg: factorize reset function
parent
d9b1afb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
25 deletions
+18
-25
modules/demux/ogg.c
modules/demux/ogg.c
+18
-25
No files found.
modules/demux/ogg.c
View file @
5b7ac4ad
...
@@ -421,6 +421,22 @@ static int Demux( demux_t * p_demux )
...
@@ -421,6 +421,22 @@ static int Demux( demux_t * p_demux )
return
1
;
return
1
;
}
}
static
void
Ogg_ResetStreamHelper
(
demux_sys_t
*
p_sys
)
{
for
(
int
i
=
0
;
i
<
p_sys
->
i_streams
;
i
++
)
{
logical_stream_t
*
p_stream
=
p_sys
->
pp_stream
[
i
];
/* we'll trash all the data until we find the next pcr */
p_stream
->
b_reinit
=
true
;
p_stream
->
i_pcr
=
-
1
;
p_stream
->
i_interpolated_pcr
=
-
1
;
p_stream
->
i_previous_granulepos
=
-
1
;
ogg_stream_reset
(
&
p_stream
->
os
);
}
ogg_sync_reset
(
&
p_sys
->
oy
);
}
/*****************************************************************************
/*****************************************************************************
* Control:
* Control:
*****************************************************************************/
*****************************************************************************/
...
@@ -430,7 +446,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -430,7 +446,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
vlc_meta_t
*
p_meta
;
vlc_meta_t
*
p_meta
;
int64_t
*
pi64
;
int64_t
*
pi64
;
bool
*
pb_bool
;
bool
*
pb_bool
;
int
i
;
switch
(
i_query
)
switch
(
i_query
)
{
{
...
@@ -478,18 +493,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -478,18 +493,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
for
(
i
=
0
;
i
<
p_sys
->
i_streams
;
i
++
)
Ogg_ResetStreamHelper
(
p_sys
);
{
logical_stream_t
*
p_stream
=
p_sys
->
pp_stream
[
i
];
/* we'll trash all the data until we find the next pcr */
p_stream
->
b_reinit
=
true
;
p_stream
->
i_pcr
=
-
1
;
p_stream
->
i_interpolated_pcr
=
-
1
;
p_stream
->
i_previous_granulepos
=
-
1
;
ogg_stream_reset
(
&
p_stream
->
os
);
}
ogg_sync_reset
(
&
p_sys
->
oy
);
return
demux_vaControlHelper
(
p_demux
->
s
,
0
,
-
1
,
p_sys
->
i_bitrate
,
return
demux_vaControlHelper
(
p_demux
->
s
,
0
,
-
1
,
p_sys
->
i_bitrate
,
1
,
i_query
,
args
);
1
,
i_query
,
args
);
case
DEMUX_GET_LENGTH
:
case
DEMUX_GET_LENGTH
:
...
@@ -538,18 +542,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -538,18 +542,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
for
(
i
=
0
;
i
<
p_sys
->
i_streams
;
i
++
)
Ogg_ResetStreamHelper
(
p_sys
);
{
logical_stream_t
*
p_stream
=
p_sys
->
pp_stream
[
i
];
/* we'll trash all the data until we find the next pcr */
p_stream
->
b_reinit
=
true
;
p_stream
->
i_pcr
=
-
1
;
p_stream
->
i_interpolated_pcr
=
-
1
;
p_stream
->
i_previous_granulepos
=
-
1
;
ogg_stream_reset
(
&
p_stream
->
os
);
}
ogg_sync_reset
(
&
p_sys
->
oy
);
int64_t
i_block
=
p_sys
->
pp_seekpoints
[
i_seekpoint
]
->
i_time_offset
*
p_sys
->
i_bitrate
/
INT64_C
(
8000000
);
int64_t
i_block
=
p_sys
->
pp_seekpoints
[
i_seekpoint
]
->
i_time_offset
*
p_sys
->
i_bitrate
/
INT64_C
(
8000000
);
if
(
stream_Seek
(
p_demux
->
s
,
i_block
)
)
if
(
stream_Seek
(
p_demux
->
s
,
i_block
)
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
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