X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faudio_output%2Ffile.c;h=3bee0ebd7136c6f529b67396f9c880d391111d05;hb=05c3c71df21fe5aca59f631b3841e70dbd2bd8db;hp=3212e6ce78bc03f7cfcf148b8207e4e5860c5b00;hpb=1b2b3551a6981a0a41fa575d3677a944c37c9e50;p=vlc diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c index 3212e6ce78..3bee0ebd71 100644 --- a/modules/audio_output/file.c +++ b/modules/audio_output/file.c @@ -30,13 +30,11 @@ # include "config.h" #endif -#include - #include #include #include #include /* WAVEHEADER */ -#include +#include #define FRAME_SIZE 2048 #define A52_FRAME_NB 1536 @@ -156,7 +154,7 @@ static int Open( vlc_object_t * p_this ) if( !strcmp( psz_name, "-" ) ) p_aout->output.p_sys->p_file = stdout; else - p_aout->output.p_sys->p_file = utf8_fopen( psz_name, "wb" ); + p_aout->output.p_sys->p_file = vlc_fopen( psz_name, "wb" ); free( psz_name ); if ( p_aout->output.p_sys->p_file == NULL ) @@ -223,7 +221,7 @@ static int Open( vlc_object_t * p_this ) /* Write wave header */ WAVEHEADER *wh = &p_aout->output.p_sys->waveh; - memset( wh, 0, sizeof(wh) ); + memset( wh, 0, sizeof(*wh) ); switch( p_aout->output.output.i_format ) { @@ -323,7 +321,7 @@ static void Play( aout_instance_t * p_aout ) p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo ); - if( fwrite( p_buffer->p_buffer, p_buffer->i_nb_bytes, 1, + if( fwrite( p_buffer->p_buffer, p_buffer->i_buffer, 1, p_aout->output.p_sys->p_file ) != 1 ) { msg_Err( p_aout, "write error (%m)" ); @@ -332,7 +330,7 @@ static void Play( aout_instance_t * p_aout ) if( p_aout->output.p_sys->b_add_wav_header ) { /* Update Wave Header */ - p_aout->output.p_sys->waveh.DataLength += p_buffer->i_nb_bytes; + p_aout->output.p_sys->waveh.DataLength += p_buffer->i_buffer; } aout_BufferFree( p_buffer );