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
03359ebc
Commit
03359ebc
authored
Feb 22, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ra144enc: set AVCodecContext.coded_frame
parent
a65f7c96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
ra144enc.c
libavcodec/ra144enc.c
+19
-6
No files found.
libavcodec/ra144enc.c
View file @
03359ebc
...
@@ -33,6 +33,15 @@
...
@@ -33,6 +33,15 @@
#include "ra144.h"
#include "ra144.h"
static
av_cold
int
ra144_encode_close
(
AVCodecContext
*
avctx
)
{
RA144Context
*
ractx
=
avctx
->
priv_data
;
ff_lpc_end
(
&
ractx
->
lpc_ctx
);
av_freep
(
&
avctx
->
coded_frame
);
return
0
;
}
static
av_cold
int
ra144_encode_init
(
AVCodecContext
*
avctx
)
static
av_cold
int
ra144_encode_init
(
AVCodecContext
*
avctx
)
{
{
RA144Context
*
ractx
;
RA144Context
*
ractx
;
...
@@ -51,15 +60,19 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx)
...
@@ -51,15 +60,19 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx)
ractx
->
avctx
=
avctx
;
ractx
->
avctx
=
avctx
;
ret
=
ff_lpc_init
(
&
ractx
->
lpc_ctx
,
avctx
->
frame_size
,
LPC_ORDER
,
ret
=
ff_lpc_init
(
&
ractx
->
lpc_ctx
,
avctx
->
frame_size
,
LPC_ORDER
,
FF_LPC_TYPE_LEVINSON
);
FF_LPC_TYPE_LEVINSON
);
return
ret
;
if
(
ret
<
0
)
}
goto
error
;
avctx
->
coded_frame
=
avcodec_alloc_frame
();
if
(
!
avctx
->
coded_frame
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
error
;
}
static
av_cold
int
ra144_encode_close
(
AVCodecContext
*
avctx
)
{
RA144Context
*
ractx
=
avctx
->
priv_data
;
ff_lpc_end
(
&
ractx
->
lpc_ctx
);
return
0
;
return
0
;
error:
ra144_encode_close
(
avctx
);
return
ret
;
}
}
...
...
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