Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
763a902e
Commit
763a902e
authored
Jan 12, 2015
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opus: remove dead code
opus_prepare_header is "too small to fail"
parent
99343e4b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
modules/codec/opus.c
modules/codec/opus.c
+2
-8
modules/codec/opus_header.c
modules/codec/opus_header.c
+1
-3
modules/codec/opus_header.h
modules/codec/opus_header.h
+1
-1
No files found.
modules/codec/opus.c
View file @
763a902e
...
...
@@ -611,14 +611,8 @@ static int OpenEncoder(vlc_object_t *p_this)
OpusHeader
header
;
if
(
opus_prepare_header
(
enc
->
fmt_out
.
audio
.
i_channels
,
enc
->
fmt_out
.
audio
.
i_rate
,
&
header
))
{
msg_Err
(
enc
,
"Failed to prepare header."
);
status
=
VLC_ENOMEM
;
goto
error
;
}
opus_prepare_header
(
enc
->
fmt_out
.
audio
.
i_channels
,
enc
->
fmt_out
.
audio
.
i_rate
,
&
header
);
/* needed for max encoded size calculation */
sys
->
nb_streams
=
header
.
nb_streams
;
...
...
modules/codec/opus_header.c
View file @
763a902e
...
...
@@ -299,7 +299,7 @@ static int comment_pad(char **comments, size_t *length)
return
0
;
}
int
opus_prepare_header
(
unsigned
channels
,
unsigned
rate
,
OpusHeader
*
header
)
void
opus_prepare_header
(
unsigned
channels
,
unsigned
rate
,
OpusHeader
*
header
)
{
header
->
version
=
1
;
header
->
channels
=
channels
;
...
...
@@ -309,8 +309,6 @@ int opus_prepare_header(unsigned channels, unsigned rate, OpusHeader *header)
header
->
gain
=
0
;
// 0dB
header
->
channel_mapping
=
header
->
channels
>
8
?
255
:
header
->
channels
>
2
;
return
0
;
}
static
int
opus_header_to_packet
(
const
OpusHeader
*
h
,
unsigned
char
*
packet
,
int
len
)
...
...
modules/codec/opus_header.h
View file @
763a902e
...
...
@@ -44,7 +44,7 @@ typedef struct {
}
OpusHeader
;
int
opus_header_parse
(
const
unsigned
char
*
header
,
int
len
,
OpusHeader
*
h
);
int
opus_prepare_header
(
unsigned
channels
,
unsigned
rate
,
OpusHeader
*
header
);
void
opus_prepare_header
(
unsigned
channels
,
unsigned
rate
,
OpusHeader
*
header
);
int
opus_write_header
(
uint8_t
**
p_extra
,
int
*
i_extra
,
OpusHeader
*
header
,
const
char
*
vendor
);
#endif
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