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
149394aa
Commit
149394aa
authored
Apr 18, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: fix non seekbable uncompressed bitmaps (fix #9192)
parent
b22d6462
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+8
-7
No files found.
modules/demux/avi/avi.c
View file @
149394aa
...
@@ -228,7 +228,8 @@ static mtime_t AVI_MovieGetLength( demux_t * );
...
@@ -228,7 +228,8 @@ static mtime_t AVI_MovieGetLength( demux_t * );
static
void
AVI_MetaLoad
(
demux_t
*
,
avi_chunk_list_t
*
p_riff
,
avi_chunk_avih_t
*
p_avih
);
static
void
AVI_MetaLoad
(
demux_t
*
,
avi_chunk_list_t
*
p_riff
,
avi_chunk_avih_t
*
p_avih
);
block_t
*
ReadFrame
(
demux_t
*
p_demux
,
const
avi_track_t
*
tk
,
const
int
i_size
);
block_t
*
ReadFrame
(
demux_t
*
p_demux
,
const
avi_track_t
*
tk
,
const
int
i_header
,
const
int
i_size
);
/*****************************************************************************
/*****************************************************************************
* Stream management
* Stream management
...
@@ -827,13 +828,12 @@ static void Close ( vlc_object_t * p_this )
...
@@ -827,13 +828,12 @@ static void Close ( vlc_object_t * p_this )
* ReadFrame: Reads frame, using stride if necessary
* ReadFrame: Reads frame, using stride if necessary
*****************************************************************************/
*****************************************************************************/
block_t
*
ReadFrame
(
demux_t
*
p_demux
,
const
avi_track_t
*
tk
,
const
int
i_size
)
block_t
*
ReadFrame
(
demux_t
*
p_demux
,
const
avi_track_t
*
tk
,
const
int
i_header
,
const
int
i_size
)
{
{
block_t
*
p_frame
=
stream_Block
(
p_demux
->
s
,
__EVEN
(
i_size
)
);
block_t
*
p_frame
=
stream_Block
(
p_demux
->
s
,
__EVEN
(
i_size
)
);
if
(
!
p_frame
)
return
p_frame
;
if
(
!
p_frame
)
return
p_frame
;
const
uint8_t
i_header
=
(
tk
->
i_idxposb
==
0
)
?
8
:
0
;
if
(
i_size
%
2
)
/* read was padded on word boundary */
if
(
i_size
%
2
)
/* read was padded on word boundary */
{
{
p_frame
->
i_buffer
--
;
p_frame
->
i_buffer
--
;
...
@@ -1186,7 +1186,8 @@ static int Demux_Seekable( demux_t *p_demux )
...
@@ -1186,7 +1186,8 @@ static int Demux_Seekable( demux_t *p_demux )
i_size
+=
8
;
/* need to read and skip header */
i_size
+=
8
;
/* need to read and skip header */
}
}
if
(
(
p_frame
=
ReadFrame
(
p_demux
,
tk
,
i_size
)
)
==
NULL
)
if
(
(
p_frame
=
ReadFrame
(
p_demux
,
tk
,
(
tk
->
i_idxposb
==
0
)
?
8
:
0
,
i_size
)
)
==
NULL
)
{
{
msg_Warn
(
p_demux
,
"failed reading data"
);
msg_Warn
(
p_demux
,
"failed reading data"
);
tk
->
b_eof
=
false
;
tk
->
b_eof
=
false
;
...
@@ -1356,8 +1357,8 @@ static int Demux_UnSeekable( demux_t *p_demux )
...
@@ -1356,8 +1357,8 @@ static int Demux_UnSeekable( demux_t *p_demux )
AVI_GetPTS
(
p_stream_master
)
)
<
600
*
1000
)
AVI_GetPTS
(
p_stream_master
)
)
<
600
*
1000
)
{
{
/* load it and send to decoder */
/* load it and send to decoder */
block_t
*
p_frame
;
block_t
*
p_frame
=
ReadFrame
(
p_demux
,
p_stream
,
8
,
avi_pk
.
i_size
+
8
)
;
if
(
AVI_PacketRead
(
p_demux
,
&
avi_pk
,
&
p_frame
)
||
p_frame
==
NULL
)
if
(
p_frame
==
NULL
)
{
{
return
(
-
1
);
return
(
-
1
);
}
}
...
...
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