[vlc-devel] commit: Use setvbuf instead of repeated fflush ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Oct 12 16:13:32 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Oct 12 17:13:10 2008 +0300| [902e6ae85be4f261a9b061b2f24299715e4a6e80] | committer: Rémi Denis-Courmont
Use setvbuf instead of repeated fflush
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=902e6ae85be4f261a9b061b2f24299715e4a6e80
---
modules/misc/logger.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/misc/logger.c b/modules/misc/logger.c
index 78ce11a..2e33baa 100644
--- a/modules/misc/logger.c
+++ b/modules/misc/logger.c
@@ -266,6 +266,8 @@ static int Open( vlc_object_t *p_this )
if( psz_rrd_file && *psz_rrd_file )
{
p_intf->p_sys->p_rrd = utf8_fopen( psz_rrd_file, "w" );
+ if (p_intf->p_sys->p_rrd != NULL)
+ setvbuf (p_intf->p_sys->p_rrd, NULL, _IOLBF, BUFSIZ);
}
free( psz_rrd_file );
@@ -454,6 +456,5 @@ static void DoRRD( intf_thread_t *p_intf )
fprintf( p_intf->p_sys->p_rrd,
"%"PRIi64":%lld.%03llu:%lld.%03llu:%lld.%03llu\n",
now, in.quot, in.rem, dm.quot, dm.rem, out.quot, out.rem );
- fflush( p_intf->p_sys->p_rrd );
}
}
More information about the vlc-devel
mailing list