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
afc252c4
Commit
afc252c4
authored
Jun 18, 2012
by
Frode Tennebø
Committed by
Jean-Baptiste Kempf
Jun 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avi: Tidy the palette handling bit.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
17b9b9d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+7
-11
No files found.
modules/demux/avi/avi.c
View file @
afc252c4
...
...
@@ -543,15 +543,6 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
i_sar_num
=
((
i_frame_aspect_ratio
>>
16
)
&
0xffff
)
*
fmt
.
video
.
i_height
;
fmt
.
video
.
i_sar_den
=
((
i_frame_aspect_ratio
>>
0
)
&
0xffff
)
*
fmt
.
video
.
i_width
;
}
fmt
.
i_extra
=
__MAX
(
p_vids
->
p_bih
->
biSize
-
sizeof
(
VLC_BITMAPINFOHEADER
),
p_vids
->
i_chunk_size
-
sizeof
(
VLC_BITMAPINFOHEADER
)
);
if
(
fmt
.
i_extra
>
0
)
{
fmt
.
p_extra
=
malloc
(
fmt
.
i_extra
);
if
(
!
fmt
.
p_extra
)
goto
error
;
memcpy
(
fmt
.
p_extra
,
&
p_vids
->
p_bih
[
1
],
fmt
.
i_extra
);
}
msg_Dbg
(
p_demux
,
"stream[%d] video(%4.4s) %"
PRIu32
"x%"
PRIu32
" %dbpp %ffps"
,
i
,
(
char
*
)
&
p_vids
->
p_bih
->
biCompression
,
...
...
@@ -572,10 +563,15 @@ static int Open( vlc_object_t * p_this )
* to be true for all palettized codecs we support) */
if
(
fmt
.
video
.
i_bits_per_pixel
>
0
&&
fmt
.
video
.
i_bits_per_pixel
<=
8
)
{
/* The palette is not always included in biSize */
/* The palette should not be included in biSize, but come
* directly after BITMAPINFORHEADER in the BITMAPINFO structure */
fmt
.
i_extra
=
p_vids
->
i_chunk_size
-
sizeof
(
VLC_BITMAPINFOHEADER
);
if
(
fmt
.
i_extra
>
0
&&
fmt
.
p_extra
)
if
(
fmt
.
i_extra
>
0
)
{
fmt
.
p_extra
=
malloc
(
fmt
.
i_extra
);
if
(
!
fmt
.
p_extra
)
goto
error
;
memcpy
(
fmt
.
p_extra
,
&
p_vids
->
p_bih
[
1
],
fmt
.
i_extra
);
const
uint8_t
*
p_pal
=
fmt
.
p_extra
;
fmt
.
video
.
p_palette
=
calloc
(
1
,
sizeof
(
video_palette_t
)
);
...
...
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