|
|
@ -24,7 +24,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
{
|
|
|
|
{
|
|
|
|
using (var reader = new StreamReader(source))
|
|
|
|
using (var reader = new StreamReader(source))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
while (!reader.EndOfStream)
|
|
|
|
// If ffmpeg process is closed, the state is disposed, so don't write to target in that case
|
|
|
|
|
|
|
|
while (!reader.EndOfStream && target.CanWrite)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var line = await reader.ReadLineAsync().ConfigureAwait(false);
|
|
|
|
var line = await reader.ReadLineAsync().ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
|
@ -37,11 +38,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (ObjectDisposedException)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//TODO Investigate and properly fix.
|
|
|
|
|
|
|
|
// Don't spam the log. This doesn't seem to throw in windows, but sometimes under linux
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogError(ex, "Error reading ffmpeg log");
|
|
|
|
_logger.LogError(ex, "Error reading ffmpeg log");
|
|
|
|