|
@@ -29,7 +29,10 @@ import com.dmdirc.plugins.implementations.BasePlugin;
|
29
|
29
|
import com.dmdirc.plugins.implementations.PluginFilesHelper;
|
30
|
30
|
import com.dmdirc.util.io.StreamUtils;
|
31
|
31
|
|
|
32
|
+import com.google.common.io.CharStreams;
|
|
33
|
+
|
32
|
34
|
import java.io.IOException;
|
|
35
|
+import java.io.InputStreamReader;
|
33
|
36
|
import java.util.ArrayList;
|
34
|
37
|
import java.util.List;
|
35
|
38
|
|
|
@@ -75,15 +78,15 @@ public class WindowsMediaSourcePlugin extends BasePlugin
|
75
|
78
|
filesHelper.getFilesDirString() + "GetMediaInfo.exe",
|
76
|
79
|
player,
|
77
|
80
|
method});
|
78
|
|
- final StringBuffer data = new StringBuffer();
|
79
|
81
|
StreamUtils.readStream(myProcess.getErrorStream());
|
80
|
|
- StreamUtils.readStreamIntoStringBuffer(myProcess.getInputStream(), data);
|
|
82
|
+ final String data = CharStreams.toString(new InputStreamReader(
|
|
83
|
+ myProcess.getInputStream()));
|
81
|
84
|
try {
|
82
|
85
|
myProcess.waitFor();
|
83
|
86
|
} catch (InterruptedException e) {
|
84
|
87
|
}
|
85
|
88
|
|
86
|
|
- return new MediaInfoOutput(myProcess.exitValue(), data.toString());
|
|
89
|
+ return new MediaInfoOutput(myProcess.exitValue(), data);
|
87
|
90
|
} catch (SecurityException | IOException e) {
|
88
|
91
|
}
|
89
|
92
|
|