[svn r413] Send the correct GNOMEVFS_EOS message to the GnomeVFS GStreamer's source. trunk
authorrosfran
Thu Mar 08 23:55:27 2007 +0000 (2007-03-08)
branchtrunk
changeset 4087d529c58a88f
parent 407 710c4cfe5ccd
child 409 9e1e3e4916c4
[svn r413] Send the correct GNOMEVFS_EOS message to the GnomeVFS GStreamer's source.
libgnomevfs2-mythtv/modules/mythtv-method.c
     1.1 --- a/libgnomevfs2-mythtv/modules/mythtv-method.c	Thu Mar 08 23:43:33 2007 +0000
     1.2 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c	Thu Mar 08 23:55:27 2007 +0000
     1.3 @@ -307,16 +307,18 @@
     1.4  						      tmp_buffer,
     1.5  						      buffer_size, TRUE);
     1.6  
     1.7 -			if (!myth_handle->is_livetv && len <= 0) {
     1.8 -				g_byte_array_free (tmp_buffer, TRUE);
     1.9 -				g_debug ("Fail to read bytes");
    1.10 -				return GNOME_VFS_ERROR_IO;
    1.11 -			}
    1.12 -			/*else if (len == 0) {
    1.13 -			   g_byte_array_free (tmp_buffer, TRUE);
    1.14 -			   g_warning ("End of file probably achieved");
    1.15 -			   return GNOME_VFS_ERROR_EOF;
    1.16 -			   } */
    1.17 +			if ( !myth_handle->is_livetv ) {
    1.18 +				if ( len < 0 ) {
    1.19 +					g_byte_array_free (tmp_buffer, TRUE);
    1.20 +					g_debug ("Fail to read bytes");
    1.21 +					return GNOME_VFS_ERROR_IO;
    1.22 +				} else if ( len == 0 ) {
    1.23 +				   g_byte_array_free (tmp_buffer, TRUE);
    1.24 +				   g_warning ("End of file probably achieved");
    1.25 +				   return GNOME_VFS_ERROR_EOF;
    1.26 +			   }
    1.27 +			} /* if */
    1.28 +			
    1.29  			myth_handle->buffer =
    1.30  			    g_byte_array_append (myth_handle->buffer,
    1.31  						 tmp_buffer->data, len);