Flush stdin after every write.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / filter / ExternalFilter.java
index c3ab508..fa3a2d8 100644 (file)
@@ -115,6 +115,14 @@ public abstract class ExternalFilter implements Filter {
                                @Override
                                protected void feed(byte[] buffer) throws IOException {
                                        processInput.write(buffer);
+                                       processInput.flush();
+                               }
+
+                               @Override
+                               protected void finish() throws IOException {
+                                       processInput.close();
+                                       processOutput.close();
+                                       processError.close();
                                }
                        }).start();
                } catch (IOException ioe1) {