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
9bf77558
Commit
9bf77558
authored
Apr 18, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: do proper palette reading and checks
parent
b5909c98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+17
-2
modules/demux/avi/libavi.h
modules/demux/avi/libavi.h
+1
-1
No files found.
modules/demux/avi/libavi.c
View file @
9bf77558
...
...
@@ -403,12 +403,27 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t *p_chk )
{
p_chk
->
strf
.
vids
.
p_bih
->
biSize
=
p_chk
->
common
.
i_chunk_size
;
}
if
(
p_chk
->
common
.
i_chunk_size
>
sizeof
(
VLC_BITMAPINFOHEADER
)
)
uint64_t
i_extrasize
=
p_chk
->
common
.
i_chunk_size
-
sizeof
(
VLC_BITMAPINFOHEADER
);
if
(
i_extrasize
>
0
)
{
/* There's a color palette appended, set up VLC_BITMAPINFO */
memcpy
(
&
p_chk
->
strf
.
vids
.
p_bih
[
1
],
p_buff
+
8
+
sizeof
(
VLC_BITMAPINFOHEADER
),
/* 8=fourrc+size */
p_chk
->
common
.
i_chunk_size
-
sizeof
(
VLC_BITMAPINFOHEADER
)
);
i_extrasize
);
if
(
!
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
)
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
=
(
1
<<
p_chk
->
strf
.
vids
.
p_bih
->
biBitCount
);
if
(
i_extrasize
>
(
UINT32_MAX
*
sizeof
(
uint32_t
))
)
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
=
UINT32_MAX
;
else
{
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
=
__MAX
(
i_extrasize
/
sizeof
(
uint32_t
),
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
);
}
}
else
p_chk
->
strf
.
vids
.
p_bih
->
biClrUsed
=
0
;
#ifdef AVI_DEBUG
msg_Dbg
(
(
vlc_object_t
*
)
s
,
"strf: video:%4.4s %"
PRIu32
"x%"
PRIu32
" planes:%d %dbpp"
,
...
...
modules/demux/avi/libavi.h
View file @
9bf77558
...
...
@@ -122,7 +122,7 @@ typedef struct avi_chunk_strf_auds_s
WAVEFORMATEX
*
p_wf
;
}
avi_chunk_strf_auds_t
;
typedef
struct
avi_chunk_strf_vids_s
typedef
struct
ATTR_PACKED
avi_chunk_strf_vids_s
{
AVI_CHUNK_COMMON
int
i_cat
;
...
...
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