Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
4ec5f67a
Commit
4ec5f67a
authored
Apr 30, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed seek reset to avoid sending invalid PCR value (ASF).
It closes #2706.
parent
8f0345ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+20
-7
No files found.
modules/demux/asf/asf.c
View file @
4ec5f67a
...
...
@@ -245,6 +245,24 @@ static int SeekIndex( demux_t *p_demux, mtime_t i_date, float f_pos )
return
stream_Seek
(
p_demux
->
s
,
p_sys
->
i_data_begin
+
i_pos
);
}
static
void
SeekPrepare
(
demux_t
*
p_demux
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
p_sys
->
i_time
=
-
1
;
for
(
int
i
=
0
;
i
<
128
;
i
++
)
{
asf_track_t
*
tk
=
p_sys
->
track
[
i
];
if
(
!
tk
)
continue
;
tk
->
i_time
=
1
;
if
(
tk
->
p_frame
)
block_ChainRelease
(
tk
->
p_frame
);
tk
->
p_frame
=
NULL
;
}
}
/*****************************************************************************
* Control:
*****************************************************************************/
...
...
@@ -254,7 +272,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
vlc_meta_t
*
p_meta
;
int64_t
i64
,
*
pi64
;
double
f
,
*
pf
;
int
i
;
switch
(
i_query
)
{
...
...
@@ -270,9 +287,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_SUCCESS
;
case
DEMUX_SET_TIME
:
p_sys
->
i_time
=
-
1
;
for
(
i
=
0
;
i
<
128
;
i
++
)
if
(
p_sys
->
track
[
i
]
)
p_sys
->
track
[
i
]
->
i_time
=
-
1
;
SeekPrepare
(
p_demux
);
if
(
p_sys
->
b_index
&&
p_sys
->
i_length
>
0
)
{
...
...
@@ -301,9 +316,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
i_query
,
args
);
case
DEMUX_SET_POSITION
:
p_sys
->
i_time
=
-
1
;
for
(
i
=
0
;
i
<
128
;
i
++
)
if
(
p_sys
->
track
[
i
]
)
p_sys
->
track
[
i
]
->
i_time
=
-
1
;
SeekPrepare
(
p_demux
);
if
(
p_sys
->
b_index
&&
p_sys
->
i_length
>
0
)
{
...
...
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