Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f3205789
Commit
f3205789
authored
Sep 07, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed AVI palette support.
parent
61146f7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+13
-12
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+1
-1
No files found.
modules/demux/avi/avi.c
View file @
f3205789
...
...
@@ -568,21 +568,22 @@ static int Open( vlc_object_t * p_this )
/* Extract palette from extradata if bpp <= 8
* (assumes that extradata contains only palette but appears
* to be true for all palettized codecs we support) */
if
(
fmt
.
i_extra
&&
fmt
.
video
.
i_bits_per_pixel
<=
8
&&
fmt
.
video
.
i_bits_per_pixel
>
0
)
if
(
fmt
.
video
.
i_bits_per_pixel
>
0
&&
fmt
.
video
.
i_bits_per_pixel
<=
8
)
{
int
i
;
/* The palette is not always included in biSize */
fmt
.
i_extra
=
p_vids
->
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
);
if
(
fmt
.
i_extra
>
0
)
{
const
uint8_t
*
p_pal
=
fmt
.
p_extra
;
fmt
.
video
.
p_palette
=
calloc
(
sizeof
(
video_palette_t
),
1
);
fmt
.
video
.
p_palette
->
i_entries
=
1
;
fmt
.
video
.
p_palette
=
calloc
(
sizeof
(
video_palette_t
),
1
);
fmt
.
video
.
p_palette
->
i_entries
=
__MIN
(
fmt
.
i_extra
/
4
,
256
)
;
/* Apparently this is necessary. But why ? */
fmt
.
i_extra
=
p_vids
->
i_chunk_size
-
sizeof
(
BITMAPINFOHEADER
);
for
(
i
=
0
;
i
<
__MIN
(
fmt
.
i_extra
/
4
,
256
);
i
++
)
{
((
uint32_t
*
)
&
fmt
.
video
.
p_palette
->
palette
[
0
][
0
])[
i
]
=
GetDWLE
((
uint32_t
*
)
fmt
.
p_extra
+
i
);
for
(
int
i
=
0
;
i
<
fmt
.
video
.
p_palette
->
i_entries
;
i
++
)
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
fmt
.
video
.
p_palette
->
palette
[
i
][
j
]
=
p_pal
[
4
*
i
+
j
];
}
}
}
break
;
...
...
modules/demux/avi/libavi.c
View file @
f3205789
...
...
@@ -398,7 +398,7 @@ 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
->
strf
.
vids
.
p_bih
->
biS
ize
-
sizeof
(
BITMAPINFOHEADER
)
>
0
)
if
(
p_chk
->
common
.
i_chunk_s
ize
-
sizeof
(
BITMAPINFOHEADER
)
>
0
)
{
memcpy
(
&
p_chk
->
strf
.
vids
.
p_bih
[
1
],
p_buff
+
8
+
sizeof
(
BITMAPINFOHEADER
),
/* 8=fourrc+size */
...
...
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