Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
02ac7311
Commit
02ac7311
authored
Jul 15, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: use avfilter_unref_bufferp() where appropriate.
parent
043800a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
22 deletions
+13
-22
avplay.c
avplay.c
+3
-9
af_join.c
libavfilter/af_join.c
+2
-2
fifo.c
libavfilter/fifo.c
+2
-2
vf_overlay.c
libavfilter/vf_overlay.c
+1
-2
vf_yadif.c
libavfilter/vf_yadif.c
+4
-5
vsrc_movie.c
libavfilter/vsrc_movie.c
+1
-2
No files found.
avplay.c
View file @
02ac7311
...
...
@@ -1235,10 +1235,7 @@ static void stream_close(VideoState *is)
for
(
i
=
0
;
i
<
VIDEO_PICTURE_QUEUE_SIZE
;
i
++
)
{
vp
=
&
is
->
pictq
[
i
];
#if CONFIG_AVFILTER
if
(
vp
->
picref
)
{
avfilter_unref_buffer
(
vp
->
picref
);
vp
->
picref
=
NULL
;
}
avfilter_unref_bufferp
(
&
vp
->
picref
);
#endif
if
(
vp
->
bmp
)
{
SDL_FreeYUVOverlay
(
vp
->
bmp
);
...
...
@@ -1287,9 +1284,7 @@ static void alloc_picture(void *opaque)
SDL_FreeYUVOverlay
(
vp
->
bmp
);
#if CONFIG_AVFILTER
if
(
vp
->
picref
)
avfilter_unref_buffer
(
vp
->
picref
);
vp
->
picref
=
NULL
;
avfilter_unref_bufferp
(
&
vp
->
picref
);
vp
->
width
=
is
->
out_video_filter
->
inputs
[
0
]
->
w
;
vp
->
height
=
is
->
out_video_filter
->
inputs
[
0
]
->
h
;
...
...
@@ -1382,8 +1377,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
if
(
vp
->
bmp
)
{
AVPicture
pict
=
{
{
0
}
};
#if CONFIG_AVFILTER
if
(
vp
->
picref
)
avfilter_unref_buffer
(
vp
->
picref
);
avfilter_unref_bufferp
(
&
vp
->
picref
);
vp
->
picref
=
src_frame
->
opaque
;
#endif
...
...
libavfilter/af_join.c
View file @
02ac7311
...
...
@@ -248,7 +248,7 @@ static void join_uninit(AVFilterContext *ctx)
for
(
i
=
0
;
i
<
ctx
->
nb_inputs
;
i
++
)
{
av_freep
(
&
ctx
->
input_pads
[
i
].
name
);
avfilter_unref_buffer
(
s
->
input_frames
[
i
]);
avfilter_unref_buffer
p
(
&
s
->
input_frames
[
i
]);
}
av_freep
(
&
s
->
channels
);
...
...
@@ -402,7 +402,7 @@ static void join_free_buffer(AVFilterBuffer *buf)
int
i
;
for
(
i
=
0
;
i
<
priv
->
nb_in_buffers
;
i
++
)
avfilter_unref_buffer
(
priv
->
in_buffers
[
i
]);
avfilter_unref_buffer
p
(
&
priv
->
in_buffers
[
i
]);
av_freep
(
&
priv
->
in_buffers
);
av_freep
(
&
buf
->
priv
);
...
...
libavfilter/fifo.c
View file @
02ac7311
...
...
@@ -65,11 +65,11 @@ static av_cold void uninit(AVFilterContext *ctx)
for
(
buf
=
fifo
->
root
.
next
;
buf
;
buf
=
tmp
)
{
tmp
=
buf
->
next
;
avfilter_unref_buffer
(
buf
->
buf
);
avfilter_unref_buffer
p
(
&
buf
->
buf
);
av_free
(
buf
);
}
avfilter_unref_buffer
(
fifo
->
buf_out
);
avfilter_unref_buffer
p
(
&
fifo
->
buf_out
);
}
static
int
add_to_queue
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
buf
)
...
...
libavfilter/vf_overlay.c
View file @
02ac7311
...
...
@@ -88,8 +88,7 @@ static av_cold void uninit(AVFilterContext *ctx)
{
OverlayContext
*
over
=
ctx
->
priv
;
if
(
over
->
overpicref
)
avfilter_unref_buffer
(
over
->
overpicref
);
avfilter_unref_bufferp
(
&
over
->
overpicref
);
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
...
libavfilter/vf_yadif.c
View file @
02ac7311
...
...
@@ -224,8 +224,7 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
if
(
yadif
->
auto_enable
&&
!
yadif
->
cur
->
video
->
interlaced
)
{
yadif
->
out
=
avfilter_ref_buffer
(
yadif
->
cur
,
AV_PERM_READ
);
avfilter_unref_buffer
(
yadif
->
prev
);
yadif
->
prev
=
NULL
;
avfilter_unref_bufferp
(
&
yadif
->
prev
);
if
(
yadif
->
out
->
pts
!=
AV_NOPTS_VALUE
)
yadif
->
out
->
pts
*=
2
;
return
ff_start_frame
(
ctx
->
outputs
[
0
],
yadif
->
out
);
...
...
@@ -327,9 +326,9 @@ static av_cold void uninit(AVFilterContext *ctx)
{
YADIFContext
*
yadif
=
ctx
->
priv
;
if
(
yadif
->
prev
)
avfilter_unref_buffer
(
yadif
->
prev
);
if
(
yadif
->
cur
)
avfilter_unref_buffer
(
yadif
->
cur
);
if
(
yadif
->
next
)
avfilter_unref_buffer
(
yadif
->
next
);
if
(
yadif
->
prev
)
avfilter_unref_buffer
p
(
&
yadif
->
prev
);
if
(
yadif
->
cur
)
avfilter_unref_buffer
p
(
&
yadif
->
cur
);
if
(
yadif
->
next
)
avfilter_unref_buffer
p
(
&
yadif
->
next
);
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
...
libavfilter/vsrc_movie.c
View file @
02ac7311
...
...
@@ -299,8 +299,7 @@ static int request_frame(AVFilterLink *outlink)
ret
=
ff_end_frame
(
outlink
);
fail:
avfilter_unref_buffer
(
movie
->
picref
);
movie
->
picref
=
NULL
;
avfilter_unref_bufferp
(
&
movie
->
picref
);
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