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
845020ed
Commit
845020ed
authored
Nov 09, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cljr: use the AVFrame API properly.
parent
4a8a35bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
cljr.c
libavcodec/cljr.c
+9
-7
No files found.
libavcodec/cljr.c
View file @
845020ed
...
...
@@ -98,16 +98,18 @@ AVCodec ff_cljr_decoder = {
#endif
#if CONFIG_CLJR_ENCODER
typedef
struct
CLJRContext
{
AVFrame
picture
;
}
CLJRContext
;
static
av_cold
int
encode_init
(
AVCodecContext
*
avctx
)
{
CLJRContext
*
const
a
=
avctx
->
priv_data
;
avctx
->
coded_frame
=
av_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
avctx
->
coded_frame
=
&
a
->
picture
;
return
0
;
}
static
av_cold
int
encode_close
(
AVCodecContext
*
avctx
)
{
av_frame_free
(
&
avctx
->
coded_frame
);
return
0
;
}
...
...
@@ -155,9 +157,9 @@ AVCodec ff_cljr_encoder = {
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Cirrus Logic AccuPak"
),
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
AV_CODEC_ID_CLJR
,
.
priv_data_size
=
sizeof
(
CLJRContext
),
.
init
=
encode_init
,
.
encode2
=
encode_frame
,
.
close
=
encode_close
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[])
{
AV_PIX_FMT_YUV411P
,
AV_PIX_FMT_NONE
},
};
...
...
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