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
c3bd417a
Commit
c3bd417a
authored
Jan 17, 2009
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some demux control replies
parent
7cac6b1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
modules/access/fake.c
modules/access/fake.c
+9
-13
No files found.
modules/access/fake.c
View file @
c3bd417a
...
...
@@ -214,19 +214,16 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_SUCCESS
;
case
DEMUX_GET_POSITION
:
if
(
p_sys
->
i_duration
<=
0
)
return
VLC_EGENERIC
;
pf
=
(
double
*
)
va_arg
(
args
,
double
*
);
if
(
p_sys
->
i_duration
>
0
)
{
*
pf
=
(
double
)(
p_sys
->
i_last_pts
-
p_sys
->
i_first_pts
)
/
(
double
)(
p_sys
->
i_duration
);
}
else
{
*
pf
=
0
;
}
*
pf
=
(
double
)(
p_sys
->
i_last_pts
-
p_sys
->
i_first_pts
)
/
(
double
)(
p_sys
->
i_duration
);
return
VLC_SUCCESS
;
case
DEMUX_SET_POSITION
:
if
(
p_sys
->
i_duration
<=
0
)
return
VLC_EGENERIC
;
f
=
(
double
)
va_arg
(
args
,
double
);
i64
=
f
*
(
double
)
p_sys
->
i_duration
;
p_sys
->
i_first_pts
=
p_sys
->
i_last_pts
-
i64
;
...
...
@@ -235,13 +232,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case
DEMUX_GET_TIME
:
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
if
(
p_sys
->
i_duration
)
*
pi64
=
p_sys
->
i_last_pts
-
p_sys
->
i_first_pts
;
else
*
pi64
=
p_sys
->
i_last_pts
;
*
pi64
=
p_sys
->
i_last_pts
-
p_sys
->
i_first_pts
;
return
VLC_SUCCESS
;
case
DEMUX_GET_LENGTH
:
if
(
p_sys
->
i_duration
<=
0
)
return
VLC_EGENERIC
;
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
*
pi64
=
p_sys
->
i_duration
;
return
VLC_SUCCESS
;
...
...
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