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
cf9f7e40
Commit
cf9f7e40
authored
Apr 27, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/tinterlace: use avfilter_unref_bufferp()
parent
a853e88a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
vf_tinterlace.c
libavfilter/vf_tinterlace.c
+5
-8
No files found.
libavfilter/vf_tinterlace.c
View file @
cf9f7e40
...
...
@@ -82,8 +82,8 @@ static av_cold void uninit(AVFilterContext *ctx)
{
TInterlaceContext
*
tinterlace
=
ctx
->
priv
;
if
(
tinterlace
->
cur
)
avfilter_unref_buffer
(
tinterlace
->
cur
);
if
(
tinterlace
->
next
)
avfilter_unref_buffer
(
tinterlace
->
next
);
if
(
tinterlace
->
cur
)
avfilter_unref_buffer
p
(
&
tinterlace
->
cur
);
if
(
tinterlace
->
next
)
avfilter_unref_buffer
p
(
&
tinterlace
->
next
);
av_freep
(
&
tinterlace
->
black_data
[
0
]);
}
...
...
@@ -204,15 +204,13 @@ static void end_frame(AVFilterLink *inlink)
next
->
data
,
next
->
linesize
,
inlink
->
format
,
inlink
->
w
,
inlink
->
h
,
FIELD_UPPER_AND_LOWER
,
1
,
FIELD_LOWER
);
avfilter_unref_buffer
(
tinterlace
->
next
);
tinterlace
->
next
=
NULL
;
avfilter_unref_bufferp
(
&
tinterlace
->
next
);
break
;
case
1
:
/* only output even frames, odd frames are dropped; height unchanged, half framerate */
case
2
:
/* only output odd frames, even frames are dropped; height unchanged, half framerate */
out
=
avfilter_ref_buffer
(
tinterlace
->
mode
==
2
?
cur
:
next
,
AV_PERM_READ
);
avfilter_unref_buffer
(
tinterlace
->
next
);
tinterlace
->
next
=
NULL
;
avfilter_unref_bufferp
(
&
tinterlace
->
next
);
break
;
case
3
:
/* expand each frame to double height, but pad alternate
...
...
@@ -254,8 +252,7 @@ static void end_frame(AVFilterLink *inlink)
next
->
data
,
next
->
linesize
,
inlink
->
format
,
inlink
->
w
,
inlink
->
h
,
tff
?
FIELD_LOWER
:
FIELD_UPPER
,
1
,
tff
?
FIELD_LOWER
:
FIELD_UPPER
);
avfilter_unref_buffer
(
tinterlace
->
next
);
tinterlace
->
next
=
NULL
;
avfilter_unref_bufferp
(
&
tinterlace
->
next
);
break
;
}
...
...
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