[vlc-commits] picture: do nothing in the default destroy callback
Rémi Denis-Courmont
git at videolan.org
Wed Dec 12 20:59:28 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 12 20:41:11 2018 +0200| [c9f297fd122d436403b09a6c2d6d9fe228257ed3] | committer: Rémi Denis-Courmont
picture: do nothing in the default destroy callback
It was rather, err, peculiar to force free(p_sys).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c9f297fd122d436403b09a6c2d6d9fe228257ed3
---
src/misc/picture.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/misc/picture.c b/src/misc/picture.c
index 58aa37a120..bcab74622d 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -53,9 +53,9 @@ static void PictureDestroyContext( picture_t *p_picture )
* Destroys a picture allocated by picture_NewFromResource() but without
* a custom destruction callback.
*/
-static void picture_DestroyFromResource( picture_t *p_picture )
+static void picture_DestroyDummy( picture_t *p_picture )
{
- free( p_picture->p_sys );
+ (void) p_picture;
}
/**
@@ -235,7 +235,7 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
if( p_resource->pf_destroy != NULL )
priv->gc.destroy = p_resource->pf_destroy;
else
- priv->gc.destroy = picture_DestroyFromResource;
+ priv->gc.destroy = picture_DestroyDummy;
for( int i = 0; i < p_picture->i_planes; i++ )
{
More information about the vlc-commits
mailing list