Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c00a11ab
Commit
c00a11ab
authored
Oct 19, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/encode_audio: constify AVCodec instances
parent
40aaa8da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
encode_audio.c
doc/examples/encode_audio.c
+4
-4
No files found.
doc/examples/encode_audio.c
View file @
c00a11ab
...
...
@@ -37,7 +37,7 @@
#include "libavutil/samplefmt.h"
/* check that a given sample format is supported by the encoder */
static
int
check_sample_fmt
(
AVCodec
*
codec
,
enum
AVSampleFormat
sample_fmt
)
static
int
check_sample_fmt
(
const
AVCodec
*
codec
,
enum
AVSampleFormat
sample_fmt
)
{
const
enum
AVSampleFormat
*
p
=
codec
->
sample_fmts
;
...
...
@@ -50,7 +50,7 @@ static int check_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt)
}
/* just pick the highest supported samplerate */
static
int
select_sample_rate
(
AVCodec
*
codec
)
static
int
select_sample_rate
(
const
AVCodec
*
codec
)
{
const
int
*
p
;
int
best_samplerate
=
0
;
...
...
@@ -67,7 +67,7 @@ static int select_sample_rate(AVCodec *codec)
}
/* select layout with the highest channel count */
static
int
select_channel_layout
(
AVCodec
*
codec
)
static
int
select_channel_layout
(
const
AVCodec
*
codec
)
{
const
uint64_t
*
p
;
uint64_t
best_ch_layout
=
0
;
...
...
@@ -92,7 +92,7 @@ static int select_channel_layout(AVCodec *codec)
int
main
(
int
argc
,
char
**
argv
)
{
const
char
*
filename
;
AVCodec
*
codec
;
const
AVCodec
*
codec
;
AVCodecContext
*
c
=
NULL
;
AVFrame
*
frame
;
AVPacket
pkt
;
...
...
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