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
cb669602
Commit
cb669602
authored
Jan 11, 2016
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: fix non seekable streams
parent
1491773b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+15
-8
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+3
-4
No files found.
modules/demux/avi/avi.c
View file @
cb669602
...
...
@@ -705,13 +705,16 @@ aviindex:
{
AVI_IndexCreate
(
p_demux
);
}
else
if
(
p_sys
->
b_seekable
)
{
AVI_IndexLoad
(
p_demux
);
}
else
{
msg_Warn
(
p_demux
,
"cannot create index (unseekable stream)"
);
AVI_IndexLoad
(
p_demux
);
}
}
else
else
if
(
p_sys
->
b_seekable
)
{
AVI_IndexLoad
(
p_demux
);
}
...
...
@@ -877,11 +880,8 @@ block_t * ReadFrame( demux_t *p_demux, const avi_track_t *tk,
}
/* skip header */
if
(
tk
->
i_idxposb
==
0
)
{
p_frame
->
p_buffer
+=
i_header
;
p_frame
->
i_buffer
-=
i_header
;
}
p_frame
->
p_buffer
+=
i_header
;
p_frame
->
i_buffer
-=
i_header
;
if
(
!
tk
->
i_width_bytes
)
return
p_frame
;
...
...
@@ -1181,7 +1181,14 @@ static int Demux_Seekable( demux_t *p_demux )
}
else
{
stream_Seek
(
p_demux
->
s
,
i_pos
);
if
(
!
p_sys
->
b_fastseekable
&&
(
i_pos
>
stream_Tell
(
p_demux
->
s
))
)
{
stream_Read
(
p_demux
->
s
,
NULL
,
i_pos
-
stream_Tell
(
p_demux
->
s
)
);
}
else
{
stream_Seek
(
p_demux
->
s
,
i_pos
);
}
}
/* Set the track to use */
...
...
modules/demux/avi/libavi.c
View file @
cb669602
...
...
@@ -152,11 +152,10 @@ static int AVI_ChunkRead_list( stream_t *s, avi_chunk_t *p_container )
if
(
p_container
->
common
.
i_chunk_fourcc
==
AVIFOURCC_LIST
&&
p_container
->
list
.
i_type
==
AVIFOURCC_movi
)
{
if
(
!
b_seekable
)
return
VLC_SUCCESS
;
msg_Dbg
(
(
vlc_object_t
*
)
s
,
"skipping movi chunk"
);
if
(
b_seekable
)
return
AVI_NextChunk
(
s
,
p_container
);
else
return
VLC_EGENERIC
;
/* point at begining of LIST-movi */
return
AVI_NextChunk
(
s
,
p_container
);
/* points at begining of LIST-movi if not seekable */
}
if
(
stream_Read
(
s
,
NULL
,
12
)
!=
12
)
...
...
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