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
cfc0a80a
Commit
cfc0a80a
authored
Aug 23, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvorbis: use planar sample format
parent
473b297f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
libvorbis.c
libavcodec/libvorbis.c
+3
-5
No files found.
libavcodec/libvorbis.c
View file @
cfc0a80a
...
...
@@ -264,18 +264,16 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
/* send samples to libvorbis */
if
(
frame
)
{
const
float
*
audio
=
(
const
float
*
)
frame
->
data
[
0
];
const
int
samples
=
frame
->
nb_samples
;
float
**
buffer
;
int
c
,
channels
=
s
->
vi
.
channels
;
buffer
=
vorbis_analysis_buffer
(
&
s
->
vd
,
samples
);
for
(
c
=
0
;
c
<
channels
;
c
++
)
{
int
i
;
int
co
=
(
channels
>
8
)
?
c
:
ff_vorbis_encoding_channel_layout_offsets
[
channels
-
1
][
c
];
for
(
i
=
0
;
i
<
samples
;
i
++
)
buffer
[
c
][
i
]
=
audio
[
i
*
channels
+
co
]
;
memcpy
(
buffer
[
c
],
frame
->
extended_data
[
co
],
samples
*
sizeof
(
*
buffer
[
c
]))
;
}
if
((
ret
=
vorbis_analysis_wrote
(
&
s
->
vd
,
samples
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"error in vorbis_analysis_wrote()
\n
"
);
...
...
@@ -357,7 +355,7 @@ AVCodec ff_libvorbis_encoder = {
.
encode2
=
oggvorbis_encode_frame
,
.
close
=
oggvorbis_encode_close
,
.
capabilities
=
CODEC_CAP_DELAY
,
.
sample_fmts
=
(
const
enum
AVSampleFormat
[])
{
AV_SAMPLE_FMT_FLT
,
.
sample_fmts
=
(
const
enum
AVSampleFormat
[])
{
AV_SAMPLE_FMT_FLT
P
,
AV_SAMPLE_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"libvorbis Vorbis"
),
.
priv_class
=
&
class
,
...
...
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