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
cd355d4d
Commit
cd355d4d
authored
Dec 16, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/abuffersrc: use AV_OPT_TYPE_SAMPLE_FMT for sample_fmt option
Simplify/extend syntax.
parent
334e2e23
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
buffersrc.c
libavfilter/buffersrc.c
+3
-6
version.h
libavfilter/version.h
+1
-1
No files found.
libavfilter/buffersrc.c
View file @
cd355d4d
...
...
@@ -58,7 +58,6 @@ typedef struct {
/* audio only */
int
sample_rate
;
enum
AVSampleFormat
sample_fmt
;
char
*
sample_fmt_str
;
int
channels
;
uint64_t
channel_layout
;
char
*
channel_layout_str
;
...
...
@@ -348,7 +347,7 @@ AVFILTER_DEFINE_CLASS(buffer);
static
const
AVOption
abuffer_options
[]
=
{
{
"time_base"
,
NULL
,
OFFSET
(
time_base
),
AV_OPT_TYPE_RATIONAL
,
{
.
dbl
=
0
},
0
,
INT_MAX
,
A
},
{
"sample_rate"
,
NULL
,
OFFSET
(
sample_rate
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
A
},
{
"sample_fmt"
,
NULL
,
OFFSET
(
sample_fmt
_str
),
AV_OPT_TYPE_STRING
,
.
flags
=
A
},
{
"sample_fmt"
,
NULL
,
OFFSET
(
sample_fmt
),
AV_OPT_TYPE_SAMPLE_FMT
,
{
.
i64
=
AV_SAMPLE_FMT_NONE
},
.
min
=
AV_SAMPLE_FMT_NONE
,
.
max
=
INT_MAX
,
.
flags
=
A
},
{
"channel_layout"
,
NULL
,
OFFSET
(
channel_layout_str
),
AV_OPT_TYPE_STRING
,
.
flags
=
A
},
{
"channels"
,
NULL
,
OFFSET
(
channels
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
A
},
{
NULL
},
...
...
@@ -361,10 +360,8 @@ static av_cold int init_audio(AVFilterContext *ctx)
BufferSourceContext
*
s
=
ctx
->
priv
;
int
ret
=
0
;
s
->
sample_fmt
=
av_get_sample_fmt
(
s
->
sample_fmt_str
);
if
(
s
->
sample_fmt
==
AV_SAMPLE_FMT_NONE
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid sample format %s
\n
"
,
s
->
sample_fmt_str
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Sample format was not set or was invalid
\n
"
);
return
AVERROR
(
EINVAL
);
}
...
...
@@ -402,7 +399,7 @@ static av_cold int init_audio(AVFilterContext *ctx)
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"tb:%d/%d samplefmt:%s samplerate:%d chlayout:%s
\n
"
,
s
->
time_base
.
num
,
s
->
time_base
.
den
,
s
->
sample_fmt_str
,
s
->
time_base
.
num
,
s
->
time_base
.
den
,
av_get_sample_fmt_name
(
s
->
sample_fmt
)
,
s
->
sample_rate
,
s
->
channel_layout_str
);
s
->
warning_limit
=
100
;
...
...
libavfilter/version.h
View file @
cd355d4d
...
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 4
#define LIBAVFILTER_VERSION_MINOR 0
#define LIBAVFILTER_VERSION_MICRO 10
2
#define LIBAVFILTER_VERSION_MICRO 10
3
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
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