[MPlayer-cvslog] r34839 - trunk/stream/stream_ffmpeg.c

reimar subversion at mplayerhq.hu
Wed Apr 4 20:45:37 CEST 2012


Author: reimar
Date: Wed Apr  4 20:45:37 2012
New Revision: 34839

Log:
Fix write_buffer: flush after each write and
return an error code when an error occurred.

Modified:
   trunk/stream/stream_ffmpeg.c

Modified: trunk/stream/stream_ffmpeg.c
==============================================================================
--- trunk/stream/stream_ffmpeg.c	Wed Apr  4 20:42:33 2012	(r34838)
+++ trunk/stream/stream_ffmpeg.c	Wed Apr  4 20:45:37 2012	(r34839)
@@ -34,7 +34,11 @@ static int fill_buffer(stream_t *s, char
 
 static int write_buffer(stream_t *s, char *buffer, int len)
 {
+    AVIOContext *ctx = s->priv;
     avio_write(s->priv, buffer, len);
+    avio_flush(s->priv);
+    if (ctx->error)
+        return -1;
     return len;
 }
 


More information about the MPlayer-cvslog mailing list