changeset 34791:9c1083333ad1

vo_yuv4mpeg: flush userspace FILE buffers after each frame. Potentially reduces delay when piping to stdout/fifo.
author reimar
date Fri, 27 Apr 2012 14:33:07 +0000
parents 89c7cd996a36
children b12b523e18f2
files libvo/vo_yuv4mpeg.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_yuv4mpeg.c	Wed Apr 25 01:07:11 2012 +0000
+++ b/libvo/vo_yuv4mpeg.c	Fri Apr 27 14:33:07 2012 +0000
@@ -170,6 +170,7 @@
 	if (fwrite(ptr, 1, num_bytes, yuv_out) != num_bytes)
 		mp_msg(MSGT_VO,MSGL_ERR,
 			MSGTR_VO_YUV4MPEG_OutFileWriteError);
+	fflush(yuv_out);
 }
 
 static int write_last_frame(void)