[vlc-commits] aout_DecNew: constify
Rémi Denis-Courmont
git at videolan.org
Sat Aug 6 18:58:44 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 6 19:58:34 2011 +0300| [6feb8beb5066e19382e7ccc477e7a71f3d9949ae] | committer: Rémi Denis-Courmont
aout_DecNew: constify
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6feb8beb5066e19382e7ccc477e7a71f3d9949ae
---
src/audio_output/aout_internal.h | 5 +++--
src/audio_output/dec.c | 4 +---
src/input/decoder.c | 1 +
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 0a4ac0d..6f20a02 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -172,8 +172,9 @@ void aout_FormatsPrint( audio_output_t * p_aout, const char * psz_text, const au
bool aout_ChangeFilterString( vlc_object_t *, audio_output_t *, const char *psz_variable, const char *psz_name, bool b_add );
/* From dec.c */
-aout_input_t *aout_DecNew( audio_output_t *, audio_sample_format_t *,
- const audio_replay_gain_t *, const aout_request_vout_t * );
+aout_input_t *aout_DecNew(audio_output_t *, const audio_sample_format_t *,
+ const audio_replay_gain_t *,
+ const aout_request_vout_t *);
void aout_DecDelete ( audio_output_t *, aout_input_t * );
aout_buffer_t * aout_DecNewBuffer( aout_input_t *, size_t );
void aout_DecDeleteBuffer( audio_output_t *, aout_input_t *, aout_buffer_t * );
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index d5e3727..2dad9cb 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -43,7 +43,7 @@
* Creates an audio output
*/
aout_input_t *aout_DecNew( audio_output_t *p_aout,
- audio_sample_format_t *p_format,
+ const audio_sample_format_t *p_format,
const audio_replay_gain_t *p_replay_gain,
const aout_request_vout_t *p_request_vout )
{
@@ -84,8 +84,6 @@ aout_input_t *aout_DecNew( audio_output_t *p_aout,
p_input->b_error = true;
- aout_FormatPrepare( p_format );
-
memcpy( &p_input->input, p_format,
sizeof(audio_sample_format_t) );
if( p_replay_gain )
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 992ec9f..ab0c211 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2287,6 +2287,7 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
p_aout = input_resource_RequestAout( p_owner->p_resource, NULL );
if( p_aout )
{
+ aout_FormatPrepare( &format );
p_aout_input = aout_DecNew( p_aout, &format,
&p_dec->fmt_out.audio_replay_gain,
&request_vout );
More information about the vlc-commits
mailing list