Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
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
videolan
vlc
Commits
bbf0e645
Commit
bbf0e645
authored
Nov 01, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture_pool: remove ..._Delete(), use ..._Release() directly
parent
67e74ed2
Changes
31
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
38 additions
and
43 deletions
+38
-43
include/vlc_picture_pool.h
include/vlc_picture_pool.h
+1
-1
modules/codec/omxil/vout.c
modules/codec/omxil/vout.c
+1
-1
modules/hw/mmal/deinterlace.c
modules/hw/mmal/deinterlace.c
+1
-1
modules/hw/mmal/vout.c
modules/hw/mmal/vout.c
+1
-1
modules/hw/vdpau/display.c
modules/hw/vdpau/display.c
+1
-1
modules/video_output/aa.c
modules/video_output/aa.c
+2
-2
modules/video_output/android/opaque.c
modules/video_output/android/opaque.c
+1
-1
modules/video_output/android/surface.c
modules/video_output/android/surface.c
+1
-1
modules/video_output/caca.c
modules/video_output/caca.c
+2
-2
modules/video_output/decklink.cpp
modules/video_output/decklink.cpp
+1
-1
modules/video_output/directfb.c
modules/video_output/directfb.c
+1
-1
modules/video_output/fb.c
modules/video_output/fb.c
+1
-1
modules/video_output/kva.c
modules/video_output/kva.c
+1
-1
modules/video_output/msw/direct2d.c
modules/video_output/msw/direct2d.c
+1
-1
modules/video_output/msw/direct3d.c
modules/video_output/msw/direct3d.c
+1
-1
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+1
-1
modules/video_output/msw/wingdi.c
modules/video_output/msw/wingdi.c
+1
-1
modules/video_output/opengl.c
modules/video_output/opengl.c
+1
-1
modules/video_output/sdl.c
modules/video_output/sdl.c
+2
-2
modules/video_output/vdummy.c
modules/video_output/vdummy.c
+1
-1
modules/video_output/vmem.c
modules/video_output/vmem.c
+1
-1
modules/video_output/wayland/shm.c
modules/video_output/wayland/shm.c
+1
-1
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+1
-1
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+1
-1
modules/video_output/yuv.c
modules/video_output/yuv.c
+1
-1
src/libvlccore.sym
src/libvlccore.sym
+1
-1
src/misc/picture_pool.c
src/misc/picture_pool.c
+1
-6
src/test/picture_pool.c
src/test/picture_pool.c
+4
-4
src/video_output/display.c
src/video_output/display.c
+1
-1
src/video_output/video_output.c
src/video_output/video_output.c
+1
-1
src/video_output/vout_wrapper.c
src/video_output/vout_wrapper.c
+2
-2
No files found.
include/vlc_picture_pool.h
View file @
bbf0e645
...
...
@@ -86,7 +86,7 @@ VLC_API picture_pool_t * picture_pool_NewFromFormat(const video_format_t *,
* All pictures must already be released to the pool. The pool will then
* released them.
*/
VLC_API
void
picture_pool_
Delet
e
(
picture_pool_t
*
);
VLC_API
void
picture_pool_
Releas
e
(
picture_pool_t
*
);
/**
* It retreives a picture_t from a pool.
...
...
modules/codec/omxil/vout.c
View file @
bbf0e645
...
...
@@ -374,7 +374,7 @@ static void Close(vlc_object_t *p_this)
}
if
(
p_sys
->
pool
)
picture_pool_
Delet
e
(
p_sys
->
pool
);
picture_pool_
Releas
e
(
p_sys
->
pool
);
free
(
p_sys
);
DeinitOmxCore
();
}
...
...
modules/hw/mmal/deinterlace.c
View file @
bbf0e645
...
...
@@ -326,7 +326,7 @@ static void Close(filter_t *filter)
mmal_component_release
(
sys
->
component
);
if
(
sys
->
picture_pool
)
picture_pool_
Delet
e
(
sys
->
picture_pool
);
picture_pool_
Releas
e
(
sys
->
picture_pool
);
vlc_mutex_destroy
(
&
sys
->
mutex
);
free
(
sys
->
pictures
);
...
...
modules/hw/mmal/vout.c
View file @
bbf0e645
...
...
@@ -348,7 +348,7 @@ static void Close(vlc_object_t *object)
mmal_component_release
(
sys
->
component
);
if
(
sys
->
picture_pool
)
picture_pool_
Delet
e
(
sys
->
picture_pool
);
picture_pool_
Releas
e
(
sys
->
picture_pool
);
else
for
(
i
=
0
;
i
<
sys
->
num_buffers
;
++
i
)
if
(
sys
->
pictures
[
i
])
...
...
modules/hw/vdpau/display.c
View file @
bbf0e645
...
...
@@ -153,7 +153,7 @@ static void PoolFree(vout_display_t *vd, picture_pool_t *pool)
if
(
sys
->
current
!=
NULL
)
picture_Release
(
sys
->
current
);
picture_pool_
Delet
e
(
pool
);
picture_pool_
Releas
e
(
pool
);
}
static
picture_pool_t
*
Pool
(
vout_display_t
*
vd
,
unsigned
requested_count
)
...
...
modules/video_output/aa.c
View file @
bbf0e645
...
...
@@ -159,7 +159,7 @@ static void Close(vlc_object_t *object)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
aa_close
(
sys
->
aa_context
);
free
(
sys
);
}
...
...
@@ -242,7 +242,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
case
VOUT_DISPLAY_RESET_PICTURES
:
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
sys
->
pool
=
NULL
;
vd
->
fmt
.
i_width
=
aa_imgwidth
(
sys
->
aa_context
);
...
...
modules/video_output/android/opaque.c
View file @
bbf0e645
...
...
@@ -263,7 +263,7 @@ static void Close(vlc_object_t *p_this)
vout_display_t
*
vd
=
(
vout_display_t
*
)
p_this
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
if
(
sys
->
window
)
sys
->
native_window
.
winRelease
(
sys
->
window
);
dlclose
(
sys
->
p_library
);
...
...
modules/video_output/android/surface.c
View file @
bbf0e645
...
...
@@ -300,7 +300,7 @@ static void Close(vlc_object_t *p_this)
vout_display_t
*
vd
=
(
vout_display_t
*
)
p_this
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
if
(
sys
->
window
)
sys
->
native_window
.
winRelease
(
sys
->
window
);
dlclose
(
sys
->
p_library
);
...
...
modules/video_output/caca.c
View file @
bbf0e645
...
...
@@ -207,7 +207,7 @@ static int Open(vlc_object_t *object)
error:
if
(
sys
)
{
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
if
(
sys
->
dither
)
cucul_free_dither
(
sys
->
dither
);
if
(
sys
->
dp
)
...
...
@@ -232,7 +232,7 @@ static void Close(vlc_object_t *object)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
if
(
sys
->
dither
)
cucul_free_dither
(
sys
->
dither
);
caca_free_display
(
sys
->
dp
);
...
...
modules/video_output/decklink.cpp
View file @
bbf0e645
...
...
@@ -765,7 +765,7 @@ static void CloseVideo(vlc_object_t *p_this)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
if
(
sys
->
pic_nosignal
)
picture_Release
(
sys
->
pic_nosignal
);
...
...
modules/video_output/directfb.c
View file @
bbf0e645
...
...
@@ -173,7 +173,7 @@ static void Close(vlc_object_t *object)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
IDirectFBSurface
*
primary
=
sys
->
primary
;
if
(
primary
)
...
...
modules/video_output/fb.c
View file @
bbf0e645
...
...
@@ -330,7 +330,7 @@ static void Close(vlc_object_t *object)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
if
(
!
sys
->
is_hw_accel
&&
sys
->
picture
)
picture_Release
(
sys
->
picture
);
...
...
modules/video_output/kva.c
View file @
bbf0e645
...
...
@@ -359,7 +359,7 @@ static void Close ( vlc_object_t *object )
DosWaitThread
(
&
sys
->
tid
,
DCWW_WAIT
);
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
DosCloseEventSem
(
sys
->
ack_event
);
...
...
modules/video_output/msw/direct2d.c
View file @
bbf0e645
...
...
@@ -173,7 +173,7 @@ static void Close(vlc_object_t *object)
D2D_DestroyRenderTarget
(
vd
);
if
(
vd
->
sys
->
pool
)
picture_pool_
Delet
e
(
vd
->
sys
->
pool
);
picture_pool_
Releas
e
(
vd
->
sys
->
pool
);
CommonClean
(
vd
);
...
...
modules/video_output/msw/direct3d.c
View file @
bbf0e645
...
...
@@ -1032,7 +1032,7 @@ static void Direct3DDestroyPool(vout_display_t *vd)
IDirect3DSurface9_Release
(
picsys
->
surface
);
if
(
picsys
->
fallback
)
picture_Release
(
picsys
->
fallback
);
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
}
sys
->
pool
=
NULL
;
}
...
...
modules/video_output/msw/directx.c
View file @
bbf0e645
...
...
@@ -1273,7 +1273,7 @@ static void DirectXDestroyPool(vout_display_t *vd)
if
(
sys
->
pool
)
{
DirectXDestroyPictureResource
(
vd
);
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
}
sys
->
pool
=
NULL
;
}
...
...
modules/video_output/msw/wingdi.c
View file @
bbf0e645
...
...
@@ -305,7 +305,7 @@ static void Clean(vout_display_t *vd)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
sys
->
pool
=
NULL
;
if
(
sys
->
off_dc
)
...
...
modules/video_output/opengl.c
View file @
bbf0e645
...
...
@@ -750,7 +750,7 @@ void vout_display_opengl_Delete(vout_display_opengl_t *vgl)
vlc_gl_Unlock
(
vgl
->
gl
);
}
if
(
vgl
->
pool
)
picture_pool_
Delet
e
(
vgl
->
pool
);
picture_pool_
Releas
e
(
vgl
->
pool
);
free
(
vgl
);
}
...
...
modules/video_output/sdl.c
View file @
bbf0e645
...
...
@@ -371,7 +371,7 @@ static void Close(vlc_object_t *object)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
if
(
sys
->
overlay
)
{
SDL_LockYUVOverlay
(
sys
->
overlay
);
...
...
@@ -537,7 +537,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
/* */
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
sys
->
pool
=
NULL
;
vout_display_PlacePicture
(
&
sys
->
place
,
&
vd
->
source
,
vd
->
cfg
,
!
sys
->
overlay
);
...
...
modules/video_output/vdummy.c
View file @
bbf0e645
...
...
@@ -125,7 +125,7 @@ static void Close(vlc_object_t *object)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
free
(
sys
);
}
...
...
modules/video_output/vmem.c
View file @
bbf0e645
...
...
@@ -240,7 +240,7 @@ static void Close(vlc_object_t *object)
if
(
sys
->
cleanup
)
sys
->
cleanup
(
sys
->
opaque
);
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
free
(
sys
);
}
...
...
modules/video_output/wayland/shm.c
View file @
bbf0e645
...
...
@@ -234,7 +234,7 @@ static void ResetPictures(vout_display_t *vd)
if
(
sys
->
pool
==
NULL
)
return
;
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
sys
->
pool
=
NULL
;
}
...
...
modules/video_output/xcb/x11.c
View file @
bbf0e645
...
...
@@ -544,6 +544,6 @@ static void ResetPictures (vout_display_t *vd)
for
(
unsigned
i
=
0
;
i
<
MAX_PICTURES
;
i
++
)
xcb_shm_detach
(
sys
->
conn
,
sys
->
seg_base
+
i
);
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
sys
->
pool
=
NULL
;
}
modules/video_output/xcb/xvideo.c
View file @
bbf0e645
...
...
@@ -605,7 +605,7 @@ static void Close (vlc_object_t *obj)
vout_display_sys_t
*
p_sys
=
vd
->
sys
;
if
(
p_sys
->
pool
)
picture_pool_
Delet
e
(
p_sys
->
pool
);
picture_pool_
Releas
e
(
p_sys
->
pool
);
/* show the default cursor */
xcb_change_window_attributes
(
p_sys
->
conn
,
p_sys
->
embed
->
handle
.
xid
,
XCB_CW_CURSOR
,
...
...
modules/video_output/yuv.c
View file @
bbf0e645
...
...
@@ -182,7 +182,7 @@ static void Close(vlc_object_t *object)
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
fclose
(
sys
->
f
);
free
(
sys
);
}
...
...
src/libvlccore.sym
View file @
bbf0e645
...
...
@@ -301,7 +301,7 @@ picture_fifo_Push
picture_New
picture_NewFromFormat
picture_NewFromResource
picture_pool_
Delet
e
picture_pool_
Releas
e
picture_pool_Get
picture_pool_GetSize
picture_pool_New
...
...
src/misc/picture_pool.c
View file @
bbf0e645
...
...
@@ -56,7 +56,7 @@ struct picture_pool_t {
vlc_mutex_t
lock
;
};
static
void
picture_pool_Release
(
picture_pool_t
*
pool
)
void
picture_pool_Release
(
picture_pool_t
*
pool
)
{
bool
destroy
;
...
...
@@ -231,11 +231,6 @@ error:
return
NULL
;
}
void
picture_pool_Delete
(
picture_pool_t
*
pool
)
{
picture_pool_Release
(
pool
);
}
picture_t
*
picture_pool_Get
(
picture_pool_t
*
pool
)
{
vlc_mutex_lock
(
&
pool
->
lock
);
...
...
src/test/picture_pool.c
View file @
bbf0e645
...
...
@@ -85,8 +85,8 @@ static void test(bool zombie)
for
(
unsigned
i
=
0
;
i
<
PICTURES
;
i
++
)
picture_Release
(
pics
[
i
]);
picture_pool_
Delet
e
(
reserve
);
picture_pool_
Delet
e
(
pool
);
picture_pool_
Releas
e
(
reserve
);
picture_pool_
Releas
e
(
pool
);
if
(
zombie
)
for
(
unsigned
i
=
0
;
i
<
PICTURES
;
i
++
)
...
...
@@ -104,8 +104,8 @@ int main(void)
reserve
=
picture_pool_Reserve
(
pool
,
PICTURES
/
2
);
assert
(
reserve
!=
NULL
);
picture_pool_
Delet
e
(
reserve
);
picture_pool_
Delet
e
(
pool
);
picture_pool_
Releas
e
(
reserve
);
picture_pool_
Releas
e
(
pool
);
test
(
false
);
test
(
true
);
...
...
src/video_output/display.c
View file @
bbf0e645
...
...
@@ -1482,7 +1482,7 @@ static void SplitterClose(vout_display_t *vd)
video_splitter_Delete
(
splitter
);
if
(
sys
->
pool
)
picture_pool_
Delet
e
(
sys
->
pool
);
picture_pool_
Releas
e
(
sys
->
pool
);
/* */
for
(
int
i
=
0
;
i
<
sys
->
count
;
i
++
)
...
...
src/video_output/video_output.c
View file @
bbf0e645
...
...
@@ -1185,7 +1185,7 @@ static void ThreadReset(vout_thread_t *vout)
if
(
vout
->
p
->
private_pool
!=
NULL
)
{
count
=
picture_pool_GetSize
(
vout
->
p
->
private_pool
);
picture_pool_
Delet
e
(
vout
->
p
->
private_pool
);
picture_pool_
Releas
e
(
vout
->
p
->
private_pool
);
}
leaks
=
picture_pool_Reset
(
vout
->
p
->
decoder_pool
);
...
...
src/video_output/vout_wrapper.c
View file @
bbf0e645
...
...
@@ -167,10 +167,10 @@ void vout_EndWrapper(vout_thread_t *vout)
assert
(
!
sys
->
display
.
filtered
);
if
(
sys
->
private_pool
)
picture_pool_
Delet
e
(
sys
->
private_pool
);
picture_pool_
Releas
e
(
sys
->
private_pool
);
if
(
sys
->
decoder_pool
!=
sys
->
display_pool
)
picture_pool_
Delet
e
(
sys
->
decoder_pool
);
picture_pool_
Releas
e
(
sys
->
decoder_pool
);
}
/*****************************************************************************
...
...
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