git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0c3523a
)
Use setvbuf instead of repeated fflush
author
Rémi Denis-Courmont
<rdenis@simphalempin.com>
Sun, 12 Oct 2008 14:13:10 +0000
(17:13 +0300)
committer
Rémi Denis-Courmont
<rdenis@simphalempin.com>
Sun, 12 Oct 2008 14:13:10 +0000
(17:13 +0300)
modules/misc/logger.c
patch
|
blob
|
history
diff --git
a/modules/misc/logger.c
b/modules/misc/logger.c
index
78ce11a
..
2e33baa
100644
(file)
--- 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 );
}
}