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
f701fe04
Commit
f701fe04
authored
Jul 09, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for VOC block type 8 (closes #142)
parent
429d3006
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
5 deletions
+50
-5
modules/demux/voc.c
modules/demux/voc.c
+50
-5
No files found.
modules/demux/voc.c
View file @
f701fe04
...
...
@@ -251,12 +251,57 @@ static int ReadBlockHeader( demux_t *p_demux )
}
break
;
/* FIXME: support block type 8 properly */
case
8
:
msg_Err
(
p_demux
,
"Unimplemented block type 8"
);
return
VLC_EGENERIC
;
case
8
:
/*
* Block 8 is a big kludge to add stereo support to block 1 :
* A block of type 8 is always followed by a block of type 1
* and specifies the number of channels in that 1-block
* (normally block 1 are always mono). In practice, block type 9
* is used for stereo rather than 8
*/
if
(
(
i_block_size
!=
4
)
||
(
stream_Read
(
p_demux
->
s
,
buf
,
4
)
<
4
)
)
goto
corrupt
;
if
(
buf
[
2
]
)
{
msg_Err
(
p_demux
,
"Unsupported compression"
);
return
VLC_EGENERIC
;
}
new_fmt
.
i_codec
=
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
);
new_fmt
.
audio
.
i_channels
=
buf
[
3
]
+
1
;
/* can't be nul */
new_fmt
.
audio
.
i_rate
=
256000000L
/
((
65536L
-
GetWLE
(
buf
))
*
new_fmt
.
audio
.
i_channels
);
new_fmt
.
audio
.
i_bytes_per_frame
=
new_fmt
.
audio
.
i_channels
;
new_fmt
.
audio
.
i_frame_length
=
1
;
new_fmt
.
audio
.
i_blockalign
=
new_fmt
.
audio
.
i_bytes_per_frame
;
new_fmt
.
audio
.
i_bitspersample
=
8
*
new_fmt
.
audio
.
i_bytes_per_frame
;
new_fmt
.
i_bitrate
=
new_fmt
.
audio
.
i_rate
*
8
;
/* read subsequent block 1 */
if
(
stream_Read
(
p_demux
->
s
,
buf
,
4
)
<
4
)
return
VLC_EGENERIC
;
/* EOF */
i_block_size
=
GetDWLE
(
buf
)
>>
8
;
msg_Dbg
(
p_demux
,
"new block: type: %u, size: %u"
,
(
unsigned
)
*
buf
,
i_block_size
);
if
(
i_block_size
<
2
)
goto
corrupt
;
i_block_size
-=
2
;
if
(
stream_Read
(
p_demux
->
s
,
buf
,
2
)
<
2
)
goto
corrupt
;
if
(
buf
[
1
]
)
{
msg_Err
(
p_demux
,
"Unsupported compression"
);
return
VLC_EGENERIC
;
}
break
;
case
9
:
case
9
:
/* newer data block with channel number and bits resolution */
if
(
i_block_size
<
12
)
goto
corrupt
;
i_block_size
-=
12
;
...
...
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