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
534a82a3
Commit
534a82a3
authored
Feb 16, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/lavfi: support all sample formats.
parent
9cbf17e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
lavfi.c
libavdevice/lavfi.c
+10
-2
No files found.
libavdevice/lavfi.c
View file @
534a82a3
...
...
@@ -206,7 +206,11 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
if
(
ret
<
0
)
goto
end
;
}
else
if
(
type
==
AVMEDIA_TYPE_AUDIO
)
{
enum
AVSampleFormat
sample_fmts
[]
=
{
AV_SAMPLE_FMT_S16
,
-
1
};
enum
AVSampleFormat
sample_fmts
[]
=
{
AV_SAMPLE_FMT_U8
,
AV_SAMPLE_FMT_S16
,
AV_SAMPLE_FMT_S32
,
AV_SAMPLE_FMT_FLT
,
AV_SAMPLE_FMT_DBL
,
-
1
};
const
int
packing_fmts
[]
=
{
AVFILTER_PACKED
,
-
1
};
const
int64_t
*
chlayouts
=
avfilter_all_channel_layouts
;
AVABufferSinkParams
*
abuffersink_params
=
av_abuffersink_params_alloc
();
...
...
@@ -253,12 +257,16 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
st
->
sample_aspect_ratio
=
st
->
codec
->
sample_aspect_ratio
=
link
->
sample_aspect_ratio
;
}
else
if
(
link
->
type
==
AVMEDIA_TYPE_AUDIO
)
{
st
->
codec
->
codec_id
=
CODEC_ID_PCM_S16LE
;
st
->
codec
->
codec_id
=
av_get_pcm_codec
(
link
->
format
,
-
1
)
;
st
->
codec
->
channels
=
av_get_channel_layout_nb_channels
(
link
->
channel_layout
);
st
->
codec
->
sample_fmt
=
link
->
format
;
st
->
codec
->
sample_rate
=
link
->
sample_rate
;
st
->
codec
->
time_base
=
link
->
time_base
;
st
->
codec
->
channel_layout
=
link
->
channel_layout
;
if
(
st
->
codec
->
codec_id
==
CODEC_ID_NONE
)
av_log
(
avctx
,
AV_LOG_ERROR
,
"Could not find PCM codec for sample format %s.
\n
"
,
av_get_sample_fmt_name
(
link
->
format
));
}
}
...
...
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