[vlc-commits] file aout: implement flush operation (kind of)
Rémi Denis-Courmont
git at videolan.org
Fri Nov 16 17:13:10 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Nov 16 18:12:40 2012 +0200| [db978fb3dec674c666be3d1eb1e0dc6a4bdef152] | committer: Rémi Denis-Courmont
file aout: implement flush operation (kind of)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db978fb3dec674c666be3d1eb1e0dc6a4bdef152
---
modules/audio_output/file.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c
index f5dbf07..c4a5e5e 100644
--- a/modules/audio_output/file.c
+++ b/modules/audio_output/file.c
@@ -72,6 +72,7 @@ static const int pi_channels_maps[CHANNELS_MAX+1] =
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Play ( audio_output_t *, block_t * );
+static void Flush ( audio_output_t *, bool );
/*****************************************************************************
* Module descriptor
@@ -157,7 +158,7 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
p_aout->time_get = NULL;
p_aout->play = Play;
p_aout->pause = NULL;
- p_aout->flush = NULL;
+ p_aout->flush = Flush;
/* Audio format */
psz_format = var_InheritString( p_aout, "audiofile-format" );
@@ -314,6 +315,13 @@ static void Play( audio_output_t * p_aout, block_t *p_buffer )
block_Release( p_buffer );
}
+static void Flush( audio_output_t *aout, bool wait )
+{
+ if( fflush( aout->sys->p_file ) )
+ msg_Err( aout, "flush error (%m)" );
+ (void) wait;
+}
+
static int Open(vlc_object_t *obj)
{
audio_output_t *aout = (audio_output_t *)obj;
More information about the vlc-commits
mailing list