Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
8a9c9327
Commit
8a9c9327
authored
Mar 15, 2018
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: flac: fix pos/length on non zero starting flac
parent
adb75830
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
modules/demux/flac.c
modules/demux/flac.c
+12
-5
No files found.
modules/demux/flac.c
View file @
8a9c9327
...
...
@@ -534,10 +534,15 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
const
double
f
=
va_arg
(
args
,
double
);
int64_t
i_length
=
ControlGetLength
(
p_demux
);
int
i_ret
;
if
(
i_length
>
0
)
return
ControlSetTime
(
p_demux
,
i_length
*
f
);
{
i_ret
=
ControlSetTime
(
p_demux
,
i_length
*
f
);
if
(
i_ret
==
VLC_SUCCESS
)
return
i_ret
;
}
/* just byte pos seek */
i
nt
i
_ret
=
vlc_stream_Seek
(
p_demux
->
s
,
(
int64_t
)
(
f
*
stream_Size
(
p_demux
->
s
))
);
i_ret
=
vlc_stream_Seek
(
p_demux
->
s
,
(
int64_t
)
(
f
*
stream_Size
(
p_demux
->
s
))
);
if
(
i_ret
==
VLC_SUCCESS
)
{
p_sys
->
i_next_block_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
...
...
@@ -556,11 +561,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
const
int64_t
i_length
=
ControlGetLength
(
p_demux
);
if
(
i_length
>
0
)
{
double
*
pf
=
va_arg
(
args
,
double
*
);
double
current
=
ControlGetTime
(
p_demux
);
*
pf
=
current
/
(
double
)
i_length
;
if
(
current
<=
i_length
)
{
*
(
va_arg
(
args
,
double
*
))
=
current
/
(
double
)
i_length
;
return
VLC_SUCCESS
;
}
}
/* Else fallback on byte position */
}
else
if
(
i_query
==
DEMUX_GET_ATTACHMENTS
)
...
...
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