Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
99ddaf5a
Commit
99ddaf5a
authored
Jul 19, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: fix interleaved/seekable confusion
parent
f10d3f04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+8
-11
No files found.
modules/demux/avi/avi.c
View file @
99ddaf5a
...
...
@@ -173,6 +173,7 @@ struct demux_sys_t
mtime_t
i_time
;
mtime_t
i_length
;
bool
b_interleaved
;
bool
b_seekable
;
bool
b_fastseekable
;
bool
b_indexloaded
;
/* if we read indexes from end of file before starting */
...
...
@@ -298,12 +299,7 @@ static int Open( vlc_object_t * p_this )
p_demux
->
pf_control
=
Control
;
p_demux
->
pf_demux
=
Demux_Seekable
;
/* For unseekable stream, automatically use Demux_UnSeekable */
if
(
!
p_sys
->
b_seekable
||
var_InheritBool
(
p_demux
,
"avi-interleaved"
)
)
{
p_demux
->
pf_demux
=
Demux_UnSeekable
;
}
p_sys
->
b_interleaved
=
var_InheritBool
(
p_demux
,
"avi-interleaved"
);
if
(
i_peeker
>
0
)
{
...
...
@@ -375,6 +371,8 @@ static int Open( vlc_object_t * p_this )
p_avih
->
i_flags
&
AVIF_ISINTERLEAVED
?
" IS_INTERLEAVED"
:
""
,
p_avih
->
i_flags
&
AVIF_TRUSTCKTYPE
?
" TRUST_CKTYPE"
:
""
);
p_sys
->
b_interleaved
|=
(
p_avih
->
i_flags
&
AVIF_ISINTERLEAVED
);
AVI_MetaLoad
(
p_demux
,
p_riff
,
p_avih
);
p_sys
->
i_avih_flags
=
p_avih
->
i_flags
;
...
...
@@ -1583,15 +1581,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_SUCCESS
;
case
DEMUX_SET_POSITION
:
f
=
(
double
)
va_arg
(
args
,
double
);
if
(
p_sys
->
b_seekable
)
if
(
!
p_sys
->
b_seekable
)
{
i64
=
(
mtime_t
)(
f
*
CLOCK_FREQ
*
p_sys
->
i_length
);
return
Seek
(
p_demux
,
i64
,
(
int
)(
f
*
100
)
);
return
VLC_EGENERIC
;
}
else
{
i
nt64_t
i_pos
=
stream_Size
(
p_demux
->
s
)
*
f
;
return
stream_Seek
(
p_demux
->
s
,
i_pos
);
i
64
=
(
mtime_t
)(
f
*
CLOCK_FREQ
*
p_sys
->
i_length
)
;
return
Seek
(
p_demux
,
i64
,
(
int
)(
f
*
100
)
);
}
case
DEMUX_GET_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