Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dav1d
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xuefeng Jiang
dav1d
Commits
c2e0490c
Verified
Commit
c2e0490c
authored
Feb 14, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: also free internal buffers when flushing with one frame thread
parent
d5cc8503
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
src/lib.c
src/lib.c
+16
-16
No files found.
src/lib.c
View file @
c2e0490c
...
...
@@ -392,6 +392,22 @@ void dav1d_flush(Dav1dContext *const c) {
dav1d_data_unref_internal
(
&
c
->
in
);
c
->
drain
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
(
c
->
refs
[
i
].
p
.
p
.
data
[
0
])
dav1d_thread_picture_unref
(
&
c
->
refs
[
i
].
p
);
dav1d_ref_dec
(
&
c
->
refs
[
i
].
segmap
);
dav1d_ref_dec
(
&
c
->
refs
[
i
].
refmvs
);
dav1d_cdf_thread_unref
(
&
c
->
cdf
[
i
]);
}
c
->
frame_hdr
=
NULL
;
c
->
seq_hdr
=
NULL
;
dav1d_ref_dec
(
&
c
->
seq_hdr_ref
);
c
->
mastering_display
=
NULL
;
c
->
content_light
=
NULL
;
dav1d_ref_dec
(
&
c
->
mastering_display_ref
);
dav1d_ref_dec
(
&
c
->
content_light_ref
);
if
(
c
->
n_fc
==
1
)
return
;
// mark each currently-running frame as flushing, so that we
...
...
@@ -414,22 +430,6 @@ void dav1d_flush(Dav1dContext *const c) {
}
atomic_store
(
c
->
frame_thread
.
flush
,
0
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
(
c
->
refs
[
i
].
p
.
p
.
data
[
0
])
dav1d_thread_picture_unref
(
&
c
->
refs
[
i
].
p
);
dav1d_ref_dec
(
&
c
->
refs
[
i
].
segmap
);
dav1d_ref_dec
(
&
c
->
refs
[
i
].
refmvs
);
dav1d_cdf_thread_unref
(
&
c
->
cdf
[
i
]);
}
c
->
frame_hdr
=
NULL
;
c
->
seq_hdr
=
NULL
;
dav1d_ref_dec
(
&
c
->
seq_hdr_ref
);
c
->
mastering_display
=
NULL
;
c
->
content_light
=
NULL
;
dav1d_ref_dec
(
&
c
->
mastering_display_ref
);
dav1d_ref_dec
(
&
c
->
content_light_ref
);
c
->
frame_thread
.
next
=
0
;
}
...
...
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