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
101d58fd
Commit
101d58fd
authored
Jan 19, 2008
by
Pavlov Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move appropriate code to DEMUX_GET_LENGTH and destroy saved args when done.
parent
42ca90b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
modules/demux/mpeg/mpga.c
modules/demux/mpeg/mpga.c
+9
-3
No files found.
modules/demux/mpeg/mpga.c
View file @
101d58fd
...
@@ -338,7 +338,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -338,7 +338,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
va_list
args_save
;
va_list
args_save
;
va_copy
(
args_save
,
args
);
va_copy
(
args_save
,
args
);
va_end
(
args_save
);
switch
(
i_query
)
switch
(
i_query
)
{
{
...
@@ -356,13 +355,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -356,13 +355,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
/* FIXME TODO: implement a high precision seek (with mp3 parsing)
/* FIXME TODO: implement a high precision seek (with mp3 parsing)
* needed for multi-input */
* needed for multi-input */
default
:
case
DEMUX_GET_LENGTH
:
i_ret
=
demux2_vaControlHelper
(
p_demux
->
s
,
0
,
-
1
,
i_ret
=
demux2_vaControlHelper
(
p_demux
->
s
,
0
,
-
1
,
p_sys
->
i_bitrate_avg
,
1
,
i_query
,
p_sys
->
i_bitrate_avg
,
1
,
i_query
,
args
);
args
);
/* No bitrate, we can't have it precisely, but we can compute
/* No bitrate, we can't have it precisely, but we can compute
* a raw approximation with time/position */
* a raw approximation with time/position */
if
(
i_ret
&&
i_query
==
DEMUX_GET_LENGTH
&&
!
p_sys
->
i_bitrate_avg
)
if
(
i_ret
&&
!
p_sys
->
i_bitrate_avg
)
{
{
float
f_pos
=
(
double
)(
uint64_t
)(
stream_Tell
(
p_demux
->
s
)
)
/
float
f_pos
=
(
double
)(
uint64_t
)(
stream_Tell
(
p_demux
->
s
)
)
/
(
double
)(
uint64_t
)(
stream_Size
(
p_demux
->
s
)
);
(
double
)(
uint64_t
)(
stream_Size
(
p_demux
->
s
)
);
...
@@ -376,6 +375,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -376,6 +375,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*
pi64
=
(
p_sys
->
i_pts
+
p_sys
->
i_time_offset
)
/
f_pos
;
*
pi64
=
(
p_sys
->
i_pts
+
p_sys
->
i_time_offset
)
/
f_pos
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
va_end
(
args_save
);
return
i_ret
;
default:
i_ret
=
demux2_vaControlHelper
(
p_demux
->
s
,
0
,
-
1
,
p_sys
->
i_bitrate_avg
,
1
,
i_query
,
args
);
if
(
!
i_ret
&&
p_sys
->
i_bitrate_avg
>
0
&&
if
(
!
i_ret
&&
p_sys
->
i_bitrate_avg
>
0
&&
(
i_query
==
DEMUX_SET_POSITION
||
i_query
==
DEMUX_SET_TIME
)
)
(
i_query
==
DEMUX_SET_POSITION
||
i_query
==
DEMUX_SET_TIME
)
)
{
{
...
...
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