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
f643f9bd
Commit
f643f9bd
authored
Jul 27, 2020
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cbs_vp9: Use table-based alloc/free
parent
e38646de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
cbs_vp9.c
libavcodec/cbs_vp9.c
+8
-9
No files found.
libavcodec/cbs_vp9.c
View file @
f643f9bd
...
...
@@ -479,13 +479,6 @@ static int cbs_vp9_split_fragment(CodedBitstreamContext *ctx,
return
0
;
}
static
void
cbs_vp9_free_frame
(
void
*
opaque
,
uint8_t
*
content
)
{
VP9RawFrame
*
frame
=
(
VP9RawFrame
*
)
content
;
av_buffer_unref
(
&
frame
->
data_ref
);
av_freep
(
&
frame
);
}
static
int
cbs_vp9_read_unit
(
CodedBitstreamContext
*
ctx
,
CodedBitstreamUnit
*
unit
)
{
...
...
@@ -497,8 +490,7 @@ static int cbs_vp9_read_unit(CodedBitstreamContext *ctx,
if
(
err
<
0
)
return
err
;
err
=
ff_cbs_alloc_unit_content
(
unit
,
sizeof
(
*
frame
),
&
cbs_vp9_free_frame
);
err
=
ff_cbs_alloc_unit_content2
(
ctx
,
unit
);
if
(
err
<
0
)
return
err
;
frame
=
unit
->
content
;
...
...
@@ -642,11 +634,18 @@ static int cbs_vp9_assemble_fragment(CodedBitstreamContext *ctx,
return
0
;
}
static
const
CodedBitstreamUnitTypeDescriptor
cbs_vp9_unit_types
[]
=
{
CBS_UNIT_TYPE_INTERNAL_REF
(
0
,
VP9RawFrame
,
data
),
CBS_UNIT_TYPE_END_OF_LIST
};
const
CodedBitstreamType
ff_cbs_type_vp9
=
{
.
codec_id
=
AV_CODEC_ID_VP9
,
.
priv_data_size
=
sizeof
(
CodedBitstreamVP9Context
),
.
unit_types
=
cbs_vp9_unit_types
,
.
split_fragment
=
&
cbs_vp9_split_fragment
,
.
read_unit
=
&
cbs_vp9_read_unit
,
.
write_unit
=
&
cbs_vp9_write_unit
,
...
...
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