# HG changeset patch
# User rosfran
# Date 1173398127 0
# Node ID 7d529c58a88f82ac4a4daf3d63b75de74ffc07fc
# Parent  710c4cfe5ccdeab6bac22c736ed6e6c88013b1db
[svn r413] Send the correct GNOMEVFS_EOS message to the GnomeVFS GStreamer's source.

diff -r 710c4cfe5ccd -r 7d529c58a88f libgnomevfs2-mythtv/modules/mythtv-method.c
--- a/libgnomevfs2-mythtv/modules/mythtv-method.c	Thu Mar 08 23:43:33 2007 +0000
+++ b/libgnomevfs2-mythtv/modules/mythtv-method.c	Thu Mar 08 23:55:27 2007 +0000
@@ -307,16 +307,18 @@
 						      tmp_buffer,
 						      buffer_size, TRUE);
 
-			if (!myth_handle->is_livetv && len <= 0) {
-				g_byte_array_free (tmp_buffer, TRUE);
-				g_debug ("Fail to read bytes");
-				return GNOME_VFS_ERROR_IO;
-			}
-			/*else if (len == 0) {
-			   g_byte_array_free (tmp_buffer, TRUE);
-			   g_warning ("End of file probably achieved");
-			   return GNOME_VFS_ERROR_EOF;
-			   } */
+			if ( !myth_handle->is_livetv ) {
+				if ( len < 0 ) {
+					g_byte_array_free (tmp_buffer, TRUE);
+					g_debug ("Fail to read bytes");
+					return GNOME_VFS_ERROR_IO;
+				} else if ( len == 0 ) {
+				   g_byte_array_free (tmp_buffer, TRUE);
+				   g_warning ("End of file probably achieved");
+				   return GNOME_VFS_ERROR_EOF;
+			   }
+			} /* if */
+			
 			myth_handle->buffer =
 			    g_byte_array_append (myth_handle->buffer,
 						 tmp_buffer->data, len);