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 @@ ...@@ -2,7 +2,7 @@
* encoder.c: video and audio encoder using the ffmpeg library * encoder.c: video and audio encoder using the ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -71,12 +71,6 @@ struct encoder_sys_t ...@@ -71,12 +71,6 @@ struct encoder_sys_t
AVCodec *p_codec; AVCodec *p_codec;
AVCodecContext *p_context; AVCodecContext *p_context;
/*
* Packetizer output properties
*/
sout_packetizer_input_t *p_sout_input;
sout_format_t sout_format;
/* /*
* Common properties * Common properties
*/ */
...@@ -424,7 +418,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf ) ...@@ -424,7 +418,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
if( i_samples_delay ) if( i_samples_delay )
{ {
/* Take care of the left-over from last time */ /* Take care of the left-over from last time */
int i_delay_size = i_samples_delay * 2 * int i_delay_size = i_samples_delay * 2 *
p_sys->p_context->channels; p_sys->p_context->channels;
int i_size = p_sys->i_frame_size - i_delay_size; int i_size = p_sys->i_frame_size - i_delay_size;
...@@ -471,7 +465,8 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf ) ...@@ -471,7 +465,8 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
/* Backup the remaining raw samples */ /* Backup the remaining raw samples */
if( i_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 ); i_samples * 2 * p_sys->p_context->channels );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* preferences_widgets.cpp : wxWindows plugin for vlc * preferences_widgets.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no> * Sigmund Augdal <sigmunau@idi.ntnu.no>
...@@ -111,15 +111,12 @@ ConfigControl::ConfigControl( vlc_object_t *_p_this, ...@@ -111,15 +111,12 @@ ConfigControl::ConfigControl( vlc_object_t *_p_this,
i_type( p_item->i_type ), b_advanced( p_item->b_advanced ) i_type( p_item->i_type ), b_advanced( p_item->b_advanced )
{ {
sizer = new wxBoxSizer( wxHORIZONTAL ); sizer = new wxBoxSizer( wxHORIZONTAL );
i_counter++;
} }
ConfigControl::~ConfigControl() ConfigControl::~ConfigControl()
{ {
} }
int ConfigControl::i_counter = 0;
wxSizer *ConfigControl::Sizer() wxSizer *ConfigControl::Sizer()
{ {
return sizer; return sizer;
...@@ -422,7 +419,7 @@ void StringListConfigControl::UpdateCombo( module_config_t *p_item ) ...@@ -422,7 +419,7 @@ void StringListConfigControl::UpdateCombo( module_config_t *p_item )
BEGIN_EVENT_TABLE(StringListConfigControl, wxPanel) BEGIN_EVENT_TABLE(StringListConfigControl, wxPanel)
/* Button events */ /* Button events */
EVT_BUTTON(wxID_HIGHEST+i_counter%100, StringListConfigControl::OnRefresh) EVT_BUTTON(wxID_HIGHEST, StringListConfigControl::OnRefresh)
END_EVENT_TABLE() END_EVENT_TABLE()
void StringListConfigControl::OnRefresh( wxCommandEvent& event ) void StringListConfigControl::OnRefresh( wxCommandEvent& event )
...@@ -476,7 +473,7 @@ FileConfigControl::FileConfigControl( vlc_object_t *p_this, ...@@ -476,7 +473,7 @@ FileConfigControl::FileConfigControl( vlc_object_t *p_this,
BEGIN_EVENT_TABLE(FileConfigControl, wxPanel) BEGIN_EVENT_TABLE(FileConfigControl, wxPanel)
/* Button events */ /* Button events */
EVT_BUTTON(wxID_HIGHEST+i_counter%100, FileConfigControl::OnBrowse) EVT_BUTTON(wxID_HIGHEST, FileConfigControl::OnBrowse)
END_EVENT_TABLE() END_EVENT_TABLE()
void FileConfigControl::OnBrowse( wxCommandEvent& event ) void FileConfigControl::OnBrowse( wxCommandEvent& event )
...@@ -551,7 +548,7 @@ int IntegerConfigControl::GetIntValue() ...@@ -551,7 +548,7 @@ int IntegerConfigControl::GetIntValue()
IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *p_this, IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *p_this,
module_config_t *p_item, module_config_t *p_item,
wxWindow *parent ) 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)); label = new wxStaticText(this, -1, wxU(p_item->psz_text));
sizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); sizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
...@@ -608,7 +605,7 @@ void IntegerListConfigControl::UpdateCombo( module_config_t *p_item ) ...@@ -608,7 +605,7 @@ void IntegerListConfigControl::UpdateCombo( module_config_t *p_item )
BEGIN_EVENT_TABLE(IntegerListConfigControl, wxPanel) BEGIN_EVENT_TABLE(IntegerListConfigControl, wxPanel)
/* Button events */ /* Button events */
EVT_BUTTON(wxID_HIGHEST+i_counter%100, IntegerListConfigControl::OnRefresh) EVT_BUTTON(wxID_HIGHEST, IntegerListConfigControl::OnRefresh)
END_EVENT_TABLE() END_EVENT_TABLE()
void IntegerListConfigControl::OnRefresh( wxCommandEvent& event ) void IntegerListConfigControl::OnRefresh( wxCommandEvent& event )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* preferences_widgets.h : wxWindows plugin for vlc * preferences_widgets.h : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2003 VideoLAN * 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> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -40,7 +40,6 @@ protected: ...@@ -40,7 +40,6 @@ protected:
wxBoxSizer *sizer; wxBoxSizer *sizer;
wxStaticText *label; wxStaticText *label;
vlc_object_t *p_this; vlc_object_t *p_this;
static int i_counter;
private: private:
wxString name; wxString name;
...@@ -95,7 +94,6 @@ private: ...@@ -95,7 +94,6 @@ private:
void OnRefresh( wxCommandEvent& ); void OnRefresh( wxCommandEvent& );
char *psz_name; char *psz_name;
vlc_object_t *p_this;
vlc_callback_t pf_list_update; vlc_callback_t pf_list_update;
void UpdateCombo( module_config_t *p_item ); void UpdateCombo( module_config_t *p_item );
...@@ -138,7 +136,6 @@ private: ...@@ -138,7 +136,6 @@ private:
void OnRefresh( wxCommandEvent& ); void OnRefresh( wxCommandEvent& );
char *psz_name; char *psz_name;
vlc_object_t *p_this;
vlc_callback_t pf_list_update; vlc_callback_t pf_list_update;
void UpdateCombo( module_config_t *p_item ); 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