Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
89dc056b
Commit
89dc056b
authored
Jun 04, 2019
by
Anton Khirnov
Committed by
James Almer
Mar 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libcelt: convert to new channel layout API
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
dd544b5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
libcelt_dec.c
libavcodec/libcelt_dec.c
+5
-5
No files found.
libavcodec/libcelt_dec.c
View file @
89dc056b
...
...
@@ -61,13 +61,13 @@ static av_cold int libcelt_dec_init(AVCodecContext *c)
struct
libcelt_context
*
celt
=
c
->
priv_data
;
int
err
;
if
(
!
c
->
channels
||
!
c
->
frame_size
||
c
->
frame_size
>
INT_MAX
/
sizeof
(
int16_t
)
/
c
->
channels
)
if
(
!
c
->
ch
_layout
.
nb_ch
annels
||
!
c
->
frame_size
||
c
->
frame_size
>
INT_MAX
/
sizeof
(
int16_t
)
/
c
->
ch
_layout
.
nb_ch
annels
)
return
AVERROR
(
EINVAL
);
celt
->
mode
=
celt_mode_create
(
c
->
sample_rate
,
c
->
frame_size
,
&
err
);
if
(
!
celt
->
mode
)
return
ff_celt_error_to_averror
(
err
);
celt
->
dec
=
celt_decoder_create_custom
(
celt
->
mode
,
c
->
channels
,
&
err
);
celt
->
dec
=
celt_decoder_create_custom
(
celt
->
mode
,
c
->
ch
_layout
.
nb_ch
annels
,
&
err
);
if
(
!
celt
->
dec
)
{
celt_mode_destroy
(
celt
->
mode
);
return
ff_celt_error_to_averror
(
err
);
...
...
@@ -119,8 +119,8 @@ static int libcelt_dec_decode(AVCodecContext *c, void *data,
return
ff_celt_error_to_averror
(
err
);
if
(
celt
->
discard
)
{
frame
->
nb_samples
-=
celt
->
discard
;
memmove
(
pcm
,
pcm
+
celt
->
discard
*
c
->
channels
,
frame
->
nb_samples
*
c
->
channels
*
sizeof
(
int16_t
));
memmove
(
pcm
,
pcm
+
celt
->
discard
*
c
->
ch
_layout
.
nb_ch
annels
,
frame
->
nb_samples
*
c
->
ch
_layout
.
nb_ch
annels
*
sizeof
(
int16_t
));
celt
->
discard
=
0
;
}
*
got_frame_ptr
=
1
;
...
...
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