Commit 64336427 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/encoder.c: fixed bug in the audio encoder.
* modules/gui/wxwindows/preferences_widgets.*: bug fix.
parent 5f2aa466
......@@ -2,7 +2,7 @@
* encoder.c: video and audio encoder using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: encoder.c,v 1.3 2003/10/27 19:48:16 gbazin Exp $
* $Id: encoder.c,v 1.4 2003/11/05 17:46:21 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -71,12 +71,6 @@ struct encoder_sys_t
AVCodec *p_codec;
AVCodecContext *p_context;
/*
* Packetizer output properties
*/
sout_packetizer_input_t *p_sout_input;
sout_format_t sout_format;
/*
* Common properties
*/
......@@ -471,7 +465,8 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
/* Backup the remaining raw samples */
if( i_samples )
{
memcpy( p_sys->p_buffer, p_buffer + i_samples_delay,
memcpy( p_sys->p_buffer, p_buffer + i_samples_delay * 2 *
p_sys->p_context->channels,
i_samples * 2 * p_sys->p_context->channels );
}
......
......@@ -2,7 +2,7 @@
* preferences_widgets.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: preferences_widgets.cpp,v 1.11 2003/11/05 02:43:55 gbazin Exp $
* $Id: preferences_widgets.cpp,v 1.12 2003/11/05 17:46:21 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no>
......@@ -111,15 +111,12 @@ ConfigControl::ConfigControl( vlc_object_t *_p_this,
i_type( p_item->i_type ), b_advanced( p_item->b_advanced )
{
sizer = new wxBoxSizer( wxHORIZONTAL );
i_counter++;
}
ConfigControl::~ConfigControl()
{
}
int ConfigControl::i_counter = 0;
wxSizer *ConfigControl::Sizer()
{
return sizer;
......@@ -422,7 +419,7 @@ void StringListConfigControl::UpdateCombo( module_config_t *p_item )
BEGIN_EVENT_TABLE(StringListConfigControl, wxPanel)
/* Button events */
EVT_BUTTON(wxID_HIGHEST+i_counter%100, StringListConfigControl::OnRefresh)
EVT_BUTTON(wxID_HIGHEST, StringListConfigControl::OnRefresh)
END_EVENT_TABLE()
void StringListConfigControl::OnRefresh( wxCommandEvent& event )
......@@ -476,7 +473,7 @@ FileConfigControl::FileConfigControl( vlc_object_t *p_this,
BEGIN_EVENT_TABLE(FileConfigControl, wxPanel)
/* Button events */
EVT_BUTTON(wxID_HIGHEST+i_counter%100, FileConfigControl::OnBrowse)
EVT_BUTTON(wxID_HIGHEST, FileConfigControl::OnBrowse)
END_EVENT_TABLE()
void FileConfigControl::OnBrowse( wxCommandEvent& event )
......@@ -551,7 +548,7 @@ int IntegerConfigControl::GetIntValue()
IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *p_this,
module_config_t *p_item,
wxWindow *parent )
: ConfigControl( p_this, p_item, parent )
: ConfigControl( p_this, p_item, parent ), psz_name( NULL )
{
label = new wxStaticText(this, -1, wxU(p_item->psz_text));
sizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
......@@ -608,7 +605,7 @@ void IntegerListConfigControl::UpdateCombo( module_config_t *p_item )
BEGIN_EVENT_TABLE(IntegerListConfigControl, wxPanel)
/* Button events */
EVT_BUTTON(wxID_HIGHEST+i_counter%100, IntegerListConfigControl::OnRefresh)
EVT_BUTTON(wxID_HIGHEST, IntegerListConfigControl::OnRefresh)
END_EVENT_TABLE()
void IntegerListConfigControl::OnRefresh( wxCommandEvent& event )
......
......@@ -2,7 +2,7 @@
* preferences_widgets.h : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2003 VideoLAN
* $Id: preferences_widgets.h,v 1.5 2003/11/05 02:43:55 gbazin Exp $
* $Id: preferences_widgets.h,v 1.6 2003/11/05 17:46:21 gbazin Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -40,7 +40,6 @@ protected:
wxBoxSizer *sizer;
wxStaticText *label;
vlc_object_t *p_this;
static int i_counter;
private:
wxString name;
......@@ -95,7 +94,6 @@ private:
void OnRefresh( wxCommandEvent& );
char *psz_name;
vlc_object_t *p_this;
vlc_callback_t pf_list_update;
void UpdateCombo( module_config_t *p_item );
......@@ -138,7 +136,6 @@ private:
void OnRefresh( wxCommandEvent& );
char *psz_name;
vlc_object_t *p_this;
vlc_callback_t pf_list_update;
void UpdateCombo( module_config_t *p_item );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment