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
6df306b9
Commit
6df306b9
authored
Aug 18, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a workaround for broken avi files (close #1850).
parent
2e4d57cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+16
-7
No files found.
modules/demux/avi/avi.c
View file @
6df306b9
...
...
@@ -384,19 +384,28 @@ static int Open( vlc_object_t * p_this )
tk
->
i_cat
=
AUDIO_ES
;
tk
->
i_codec
=
AVI_FourccGetCodec
(
AUDIO_ES
,
p_auds
->
p_wf
->
wFormatTag
);
if
(
tk
->
i_codec
==
VLC_FOURCC
(
'v'
,
'o'
,
'r'
,
'b'
)
)
tk
->
i_blocksize
=
0
;
/* fix vorbis VBR decoding */
else
if
(
(
tk
->
i_blocksize
=
p_auds
->
p_wf
->
nBlockAlign
)
==
0
)
tk
->
i_blocksize
=
p_auds
->
p_wf
->
nBlockAlign
;
if
(
tk
->
i_blocksize
==
0
)
{
if
(
p_auds
->
p_wf
->
wFormatTag
==
1
)
{
tk
->
i_blocksize
=
p_auds
->
p_wf
->
nChannels
*
(
p_auds
->
p_wf
->
wBitsPerSample
/
8
);
}
else
{
tk
->
i_blocksize
=
1
;
}
}
else
if
(
tk
->
i_samplesize
!=
0
&&
tk
->
i_samplesize
!=
tk
->
i_blocksize
)
{
msg_Warn
(
p_demux
,
"track[%d] samplesize=%d and blocksize=%d are not equal."
"Using blocksize as a workaround."
,
i
,
tk
->
i_samplesize
,
tk
->
i_blocksize
);
tk
->
i_samplesize
=
tk
->
i_blocksize
;
}
if
(
tk
->
i_codec
==
VLC_FOURCC
(
'v'
,
'o'
,
'r'
,
'b'
)
)
{
tk
->
i_blocksize
=
0
;
/* fix vorbis VBR decoding */
}
es_format_Init
(
&
fmt
,
AUDIO_ES
,
tk
->
i_codec
);
fmt
.
audio
.
i_channels
=
p_auds
->
p_wf
->
nChannels
;
...
...
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