From 738926876bda127f929463e9679317edba1dbfd8 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 11 Jul 2005 08:52:14 +0000 Subject: [PATCH] * Fixed a bunch of coding errors here and there. --- include/vlc/control.h | 1 + modules/demux/a52.c | 2 +- modules/demux/ps.h | 4 ++-- modules/gui/skins2/utils/position.hpp | 2 ++ modules/gui/wxwindows/wizard.cpp | 9 +++++---- modules/gui/wxwindows/wxwindows.h | 10 +++++----- modules/packetizer/mpegvideo.c | 2 ++ modules/video_filter/deinterlace.c | 21 +++++++++++---------- modules/video_filter/scale.c | 1 - po/Makefile.in.in | 8 ++++---- src/playlist/item.c | 2 ++ src/video_output/video_output.c | 2 +- 12 files changed, 36 insertions(+), 28 deletions(-) diff --git a/include/vlc/control.h b/include/vlc/control.h index 10f78cdd0e..4ccd2ad374 100644 --- a/include/vlc/control.h +++ b/include/vlc/control.h @@ -123,6 +123,7 @@ mediacontrol_position2microsecond (input_thread_t* p_input, const mediacontrol_P mediacontrol_RGBPicture* mediacontrol_RGBPicture__alloc (int datasize); void mediacontrol_RGBPicture__free (mediacontrol_RGBPicture* pic); +mediacontrol_RGBPicture* _mediacontrol_createRGBPicture (int, int, long, long long l_date, char*, int); mediacontrol_PlaylistSeq* mediacontrol_PlaylistSeq__alloc (int size); void mediacontrol_PlaylistSeq__free (mediacontrol_PlaylistSeq* ps); diff --git a/modules/demux/a52.c b/modules/demux/a52.c index 177cea14fb..5126516b5d 100644 --- a/modules/demux/a52.c +++ b/modules/demux/a52.c @@ -81,7 +81,7 @@ static int Open( vlc_object_t * p_this ) demux_sys_t *p_sys; byte_t *p_peek; int i_peek = 0; - vlc_bool_t b_big_endian; + vlc_bool_t b_big_endian = 0; /* Arbitrary initialisation */ /* Check if we are dealing with a WAV file */ if( stream_Peek( p_demux->s, &p_peek, 12 ) == 12 && diff --git a/modules/demux/ps.h b/modules/demux/ps.h index 4fd85722dd..3c5f1f8cb3 100644 --- a/modules/demux/ps.h +++ b/modules/demux/ps.h @@ -27,7 +27,7 @@ typedef struct ps_psm_t ps_psm_t; static inline int ps_id_to_type( ps_psm_t *, int ); -static inline char *ps_id_to_lang( ps_psm_t *, int ); +static inline uint8_t *ps_id_to_lang( ps_psm_t *, int ); typedef struct { @@ -390,7 +390,7 @@ static inline int ps_id_to_type( ps_psm_t *p_psm, int i_id ) return 0; } -static inline char *ps_id_to_lang( ps_psm_t *p_psm, int i_id ) +static inline uint8_t *ps_id_to_lang( ps_psm_t *p_psm, int i_id ) { int i; for( i = 0; p_psm && i < p_psm->i_es; i++ ) diff --git a/modules/gui/skins2/utils/position.hpp b/modules/gui/skins2/utils/position.hpp index 30ab2abc2a..f529709663 100644 --- a/modules/gui/skins2/utils/position.hpp +++ b/modules/gui/skins2/utils/position.hpp @@ -30,6 +30,8 @@ class Box { public: + virtual ~Box() {} + /// Get the size of the box virtual int getWidth() const = 0; virtual int getHeight() const = 0; diff --git a/modules/gui/wxwindows/wizard.cpp b/modules/gui/wxwindows/wizard.cpp index 515749069c..f492a0fff8 100644 --- a/modules/gui/wxwindows/wizard.cpp +++ b/modules/gui/wxwindows/wizard.cpp @@ -1469,7 +1469,8 @@ void WizardDialog::SetPartial( int i_from, int i_to ) this->i_to = i_to; } -void WizardDialog::SetTranscode( char *vcodec, int vb, char *acodec,int ab) +void WizardDialog::SetTranscode( char const *vcodec, int vb, + char const *acodec, int ab) { if( strcmp( vcodec, "dummy") ) { @@ -1483,18 +1484,18 @@ void WizardDialog::SetTranscode( char *vcodec, int vb, char *acodec,int ab) this->ab = ab; } -void WizardDialog::SetStream( char *method, char *address ) +void WizardDialog::SetStream( char const *method, char const *address ) { this->method = strdup( method ); this->address = strdup( address ); } -void WizardDialog::SetTranscodeOut( const char *address ) +void WizardDialog::SetTranscodeOut( char const *address ) { this->address = strdup( address ); } -void WizardDialog::SetMux( char *mux ) +void WizardDialog::SetMux( char const *mux ) { this->mux = strdup( mux ); } diff --git a/modules/gui/wxwindows/wxwindows.h b/modules/gui/wxwindows/wxwindows.h index b44f6b81f0..b3b94ce88b 100644 --- a/modules/gui/wxwindows/wxwindows.h +++ b/modules/gui/wxwindows/wxwindows.h @@ -763,18 +763,18 @@ class WizardDialog : public wxWizard { public: /* Constructor */ - WizardDialog( intf_thread_t *p_intf, wxWindow *p_parent,char *, int, int ); + WizardDialog( intf_thread_t *, wxWindow *p_parent, char *, int, int ); virtual ~WizardDialog(); - void SetTranscode( char *vcodec, int vb, char *acodec,int ab); + void SetTranscode( char const *vcodec, int vb, char const *acodec, int ab); void SetMrl( const char *mrl ); void SetTTL( int i_ttl ); void SetPartial( int, int ); - void SetStream( char *method, char *address ); - void SetTranscodeOut( const char *address ); + void SetStream( char const *method, char const *address ); + void SetTranscodeOut( char const *address ); void SetAction( int i_action ); int GetAction(); void SetSAP( bool b_enabled, const char *psz_name ); - void SetMux( char *mux ); + void SetMux( char const *mux ); void Run(); int i_action; char *method; diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c index 4115260b87..f6becef018 100644 --- a/modules/packetizer/mpegvideo.c +++ b/modules/packetizer/mpegvideo.c @@ -526,12 +526,14 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag ) /* Extention start code */ if( i_type == 0x01 ) { +#if 0 static const int mpeg2_aspect[16][2] = { {0,1}, {1,1}, {4,3}, {16,9}, {221,100}, {0,1}, {0,1}, {0,1}, {0,1}, {0,1}, {0,1}, {0,1}, {0,1}, {0,1}, {0,1}, {0,1} }; +#endif /* sequence extention */ if( p_sys->p_ext) block_Release( p_sys->p_ext ); diff --git a/modules/video_filter/deinterlace.c b/modules/video_filter/deinterlace.c index b0beac3afb..6dd4281a4a 100644 --- a/modules/video_filter/deinterlace.c +++ b/modules/video_filter/deinterlace.c @@ -190,7 +190,7 @@ static int Create( vlc_object_t *p_this ) p_vout->pf_control = Control; p_vout->p_sys->i_mode = DEINTERLACE_DISCARD; - p_vout->p_sys->b_double_rate = 0; + p_vout->p_sys->b_double_rate = VLC_FALSE; p_vout->p_sys->last_date = 0; p_vout->p_sys->p_vout = 0; vlc_mutex_init( p_vout, &p_vout->p_sys->filter_lock ); @@ -253,35 +253,35 @@ static void SetFilterMethod( vout_thread_t *p_vout, char *psz_method ) if( !strcmp( psz_method, "discard" ) ) { p_vout->p_sys->i_mode = DEINTERLACE_DISCARD; - p_vout->p_sys->b_double_rate = 0; + p_vout->p_sys->b_double_rate = VLC_FALSE; } else if( !strcmp( psz_method, "mean" ) ) { p_vout->p_sys->i_mode = DEINTERLACE_MEAN; - p_vout->p_sys->b_double_rate = 0; + p_vout->p_sys->b_double_rate = VLC_FALSE; } else if( !strcmp( psz_method, "blend" ) || !strcmp( psz_method, "average" ) || !strcmp( psz_method, "combine-fields" ) ) { p_vout->p_sys->i_mode = DEINTERLACE_BLEND; - p_vout->p_sys->b_double_rate = 0; + p_vout->p_sys->b_double_rate = VLC_FALSE; } else if( !strcmp( psz_method, "bob" ) || !strcmp( psz_method, "progressive-scan" ) ) { p_vout->p_sys->i_mode = DEINTERLACE_BOB; - p_vout->p_sys->b_double_rate = 1; + p_vout->p_sys->b_double_rate = VLC_TRUE; } else if( !strcmp( psz_method, "linear" ) ) { p_vout->p_sys->i_mode = DEINTERLACE_LINEAR; - p_vout->p_sys->b_double_rate = 1; + p_vout->p_sys->b_double_rate = VLC_TRUE; } else if( !strcmp( psz_method, "x" ) ) { p_vout->p_sys->i_mode = DEINTERLACE_X; - p_vout->p_sys->b_double_rate = 0; + p_vout->p_sys->b_double_rate = VLC_FALSE; } else { @@ -442,11 +442,13 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic ) { picture_t *pp_outpic[2]; + pp_outpic[0] = pp_outpic[1] = NULL; + vlc_mutex_lock( &p_vout->p_sys->filter_lock ); /* Get a new picture */ while( ( pp_outpic[0] = vout_CreatePicture( p_vout->p_sys->p_vout, - 0, 0, 0 ) ) + 0, 0, 0 ) ) == NULL ) { if( p_vout->b_die || p_vout->b_error ) @@ -455,7 +457,7 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic ) return; } msleep( VOUT_OUTMEM_SLEEP ); - } + } vout_DatePicture( p_vout->p_sys->p_vout, pp_outpic[0], p_pic->date ); @@ -1872,7 +1874,6 @@ static inline void XDeintBand8x8MMXEXT( uint8_t *dst, int i_dst, static void RenderX( vout_thread_t *p_vout, picture_t *p_outpic, picture_t *p_pic ) { - vout_sys_t *p_sys = p_vout->p_sys; int i_plane; /* Copy image and skip lines */ diff --git a/modules/video_filter/scale.c b/modules/video_filter/scale.c index 82e3f321d3..d2c3127998 100644 --- a/modules/video_filter/scale.c +++ b/modules/video_filter/scale.c @@ -105,7 +105,6 @@ static void CloseFilter( vlc_object_t *p_this ) ****************************************************************************/ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) { - filter_sys_t *p_sys = p_filter->p_sys; picture_t *p_pic_dst; int i_plane, i, j, k, l; diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 2ef3d975ab..ada8bb4ffa 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -32,11 +32,11 @@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ -MSGMERGE = @MSGMERGE@ +MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update -MSGINIT = @MSGINIT@ -MSGCONV = @MSGCONV@ -MSGFILTER = @MSGFILTER@ +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ diff --git a/src/playlist/item.c b/src/playlist/item.c index 64ae5e92a8..b5c6603c75 100644 --- a/src/playlist/item.c +++ b/src/playlist/item.c @@ -395,11 +395,13 @@ static void GuessType( input_item_t *p_item) { NULL, 0 } }; +#if 0 /* Unused */ static struct { char *psz_search; int i_type; } exts_array[] = { { "mp3", ITEM_TYPE_AFILE }, { NULL, 0 } }; +#endif for( i = 0; types_array[i].psz_search != NULL; i++ ) { diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index f64ac6eb69..7d5b6389c6 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -730,7 +730,7 @@ static void RunThread( vout_thread_t *p_vout) picture_t * p_last_picture = NULL; /* last picture */ picture_t * p_directbuffer; /* direct buffer to display */ - subpicture_t * p_subpic; /* subpicture pointer */ + subpicture_t * p_subpic = NULL; /* subpicture pointer */ /* * Initialize thread -- 2.39.5