[vlc-devel] commit: video_filters: remove unused p_sys structure. ( Rémi Duraffort )
git version control
git at videolan.org
Thu Jul 16 11:09:11 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jul 16 09:32:33 2009 +0200| [63a67c181de2c5e076148692a40c6a02ce5cb408] | committer: Rémi Duraffort
video_filters: remove unused p_sys structure.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=63a67c181de2c5e076148692a40c6a02ce5cb408
---
modules/video_filter/invert.c | 19 +------------------
modules/video_filter/rv32.c | 20 +-------------------
modules/video_filter/scale.c | 20 +-------------------
3 files changed, 3 insertions(+), 56 deletions(-)
diff --git a/modules/video_filter/invert.c b/modules/video_filter/invert.c
index f500858..33b2884 100644
--- a/modules/video_filter/invert.c
+++ b/modules/video_filter/invert.c
@@ -57,16 +57,6 @@ vlc_module_begin ()
vlc_module_end ()
/*****************************************************************************
- * filter_sys_t: Invert video output method descriptor
- *****************************************************************************
- * This structure is part of the video output thread descriptor.
- * It describes the Invert specific properties of an output thread.
- *****************************************************************************/
-struct filter_sys_t
-{
-};
-
-/*****************************************************************************
* Create: allocates Invert video thread output method
*****************************************************************************
* This function allocates and initializes a Invert vout method.
@@ -75,11 +65,6 @@ static int Create( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
- /* Allocate structure */
- p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
- if( p_filter->p_sys == NULL )
- return VLC_ENOMEM;
-
p_filter->pf_video_filter = Filter;
return VLC_SUCCESS;
@@ -92,9 +77,7 @@ static int Create( vlc_object_t *p_this )
*****************************************************************************/
static void Destroy( vlc_object_t *p_this )
{
- filter_t *p_filter = (filter_t *)p_this;
-
- free( p_filter->p_sys );
+ (void)p_this;
}
/*****************************************************************************
diff --git a/modules/video_filter/rv32.c b/modules/video_filter/rv32.c
index 812f42f..3a99bda 100644
--- a/modules/video_filter/rv32.c
+++ b/modules/video_filter/rv32.c
@@ -32,15 +32,6 @@
#include <vlc_plugin.h>
#include <vlc_filter.h>
-/*****************************************************************************
- * filter_sys_t : filter descriptor
- *****************************************************************************/
-struct filter_sys_t
-{
- es_format_t fmt_in;
- es_format_t fmt_out;
-};
-
/****************************************************************************
* Local prototypes
****************************************************************************/
@@ -64,7 +55,6 @@ vlc_module_end ()
static int OpenFilter( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t*)p_this;
- filter_sys_t *p_sys;
/* XXX Only support RV24 -> RV32 conversion */
if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_RGB24 ||
@@ -78,11 +68,6 @@ static int OpenFilter( vlc_object_t *p_this )
|| p_filter->fmt_in.video.i_height != p_filter->fmt_out.video.i_height )
return -1;
- /* Allocate the memory needed to store the decoder's structure */
- if( ( p_filter->p_sys = p_sys =
- (filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
- return VLC_ENOMEM;
-
p_filter->pf_video_filter = Filter;
return VLC_SUCCESS;
@@ -93,10 +78,7 @@ static int OpenFilter( vlc_object_t *p_this )
*****************************************************************************/
static void CloseFilter( vlc_object_t *p_this )
{
- filter_t *p_filter = (filter_t*)p_this;
- filter_sys_t *p_sys = p_filter->p_sys;
-
- free( p_sys );
+ (void)p_this;
}
/****************************************************************************
diff --git a/modules/video_filter/scale.c b/modules/video_filter/scale.c
index 38902b2..e59d070 100644
--- a/modules/video_filter/scale.c
+++ b/modules/video_filter/scale.c
@@ -34,15 +34,6 @@
#include <vlc_plugin.h>
#include <vlc_filter.h>
-/*****************************************************************************
- * filter_sys_t : filter descriptor
- *****************************************************************************/
-struct filter_sys_t
-{
- es_format_t fmt_in;
- es_format_t fmt_out;
-};
-
/****************************************************************************
* Local prototypes
****************************************************************************/
@@ -66,7 +57,6 @@ vlc_module_end ()
static int OpenFilter( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t*)p_this;
- filter_sys_t *p_sys;
if( ( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVP &&
p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA &&
@@ -79,11 +69,6 @@ static int OpenFilter( vlc_object_t *p_this )
return VLC_EGENERIC;
}
- /* Allocate the memory needed to store the decoder's structure */
- if( ( p_filter->p_sys = p_sys =
- (filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
- return VLC_ENOMEM;
-
p_filter->pf_video_filter = Filter;
msg_Dbg( p_filter, "%ix%i -> %ix%i", p_filter->fmt_in.video.i_width,
@@ -98,10 +83,7 @@ static int OpenFilter( vlc_object_t *p_this )
*****************************************************************************/
static void CloseFilter( vlc_object_t *p_this )
{
- filter_t *p_filter = (filter_t*)p_this;
- filter_sys_t *p_sys = p_filter->p_sys;
-
- free( p_sys );
+ (void)p_this;
}
/****************************************************************************
More information about the vlc-devel
mailing list