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
6f768ab4
Commit
6f768ab4
authored
May 15, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AVI: support WAVEFORMATEXTENSIBLE for audio
This is notably used by files produced by FFmpeg Closes #4742
parent
0e52a3d8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+10
-2
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+4
-3
No files found.
modules/demux/avi/avi.c
View file @
6f768ab4
...
...
@@ -401,6 +401,14 @@ static int Open( vlc_object_t * p_this )
{
case
(
AVIFOURCC_auds
):
tk
->
i_cat
=
AUDIO_ES
;
if
(
p_auds
->
p_wf
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
&&
p_auds
->
p_wf
->
cbSize
>=
sizeof
(
WAVEFORMATEXTENSIBLE
)
-
sizeof
(
WAVEFORMATEX
)
)
{
WAVEFORMATEXTENSIBLE
*
p_wfe
=
(
WAVEFORMATEXTENSIBLE
*
)
p_auds
->
p_wf
;
tk
->
i_codec
=
AVI_FourccGetCodec
(
AUDIO_ES
,
p_wfe
->
SubFormat
.
Data1
);
}
else
tk
->
i_codec
=
AVI_FourccGetCodec
(
AUDIO_ES
,
p_auds
->
p_wf
->
wFormatTag
);
...
...
modules/demux/avi/libavi.c
View file @
6f768ab4
...
...
@@ -342,10 +342,12 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t *p_chk )
AVI_READ4BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
nAvgBytesPerSec
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
nBlockAlign
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
wBitsPerSample
);
if
(
p_chk
->
strf
.
auds
.
p_wf
->
wFormatTag
!=
WAVE_FORMAT_PCM
&&
p_chk
->
common
.
i_chunk_size
>
sizeof
(
WAVEFORMATEX
)
)
{
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
cbSize
);
/* prevent segfault */
if
(
p_chk
->
strf
.
auds
.
p_wf
->
cbSize
>
p_chk
->
common
.
i_chunk_size
-
sizeof
(
WAVEFORMATEX
)
)
...
...
@@ -353,11 +355,10 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t *p_chk )
p_chk
->
strf
.
auds
.
p_wf
->
cbSize
=
p_chk
->
common
.
i_chunk_size
-
sizeof
(
WAVEFORMATEX
);
}
if
(
p_chk
->
strf
.
auds
.
p_wf
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
)
{
/* Found an extensible header atm almost nothing uses that. */
msg_Warn
(
(
vlc_object_t
*
)
s
,
"WAVE_FORMAT_EXTENSIBLE or "
"vorbis audio dectected: not supported"
);
msg_Dbg
(
s
,
"Extended header found"
);
}
}
else
...
...
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