Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Steve Lhomme
VLC
Commits
e7d72a70
Commit
e7d72a70
authored
Dec 08, 2017
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: fix reading WAVEFORMATEX extra
parent
d183012e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+7
-4
No files found.
modules/demux/avi/avi.c
View file @
e7d72a70
...
...
@@ -542,10 +542,13 @@ static int Open( vlc_object_t * p_this )
p_auds
->
p_wf
->
nSamplesPerSec
,
p_auds
->
p_wf
->
wBitsPerSample
);
if
(
p_auds
->
p_wf
->
cbSize
>
0
&&
p_auds
->
i_chunk_size
>
sizeof
(
WAVEFORMATEX
)
)
const
size_t
i_cboff
=
sizeof
(
WAVEFORMATEX
);
const
size_t
i_incboff
=
(
p_auds
->
p_wf
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
?
sizeof
(
WAVEFORMATEXTENSIBLE
)
-
sizeof
(
WAVEFORMATEX
)
:
0
;
if
(
p_auds
->
i_chunk_size
>=
i_cboff
+
p_auds
->
p_wf
->
cbSize
&&
p_auds
->
p_wf
->
cbSize
>
i_incboff
)
{
int
i_extra
=
__MIN
(
p_auds
->
p_wf
->
cbSize
,
p_auds
->
i_chunk_size
-
sizeof
(
WAVEFORMATEX
)
);
int
i_extra
=
p_auds
->
p_wf
->
cbSize
-
i_incboff
;
tk
->
fmt
.
p_extra
=
malloc
(
i_extra
);
if
(
unlikely
(
tk
->
fmt
.
p_extra
==
NULL
)
)
{
...
...
@@ -554,7 +557,7 @@ static int Open( vlc_object_t * p_this )
goto
error
;
}
tk
->
fmt
.
i_extra
=
i_extra
;
memcpy
(
tk
->
fmt
.
p_extra
,
&
p_auds
->
p_wf
[
1
],
tk
->
fmt
.
i_extra
);
memcpy
(
tk
->
fmt
.
p_extra
,
((
uint8_t
*
)(
&
p_auds
->
p_wf
[
1
]))
+
i_incboff
,
i_extra
);
}
break
;
}
...
...
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