diff options
Diffstat (limited to 'MediaBrowser.Controller/MediaInfo/FFMpegManager.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaInfo/FFMpegManager.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs b/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs index 746157bb3..e3604eb0e 100644 --- a/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs +++ b/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs @@ -177,7 +177,14 @@ namespace MediaBrowser.Controller.MediaInfo Directory.CreateDirectory(parentPath); - await _encoder.ExtractImage(inputPath, type, false, video.Video3DFormat, time, path, cancellationToken).ConfigureAwait(false); + using (var stream = await _encoder.ExtractImage(inputPath, type, false, video.Video3DFormat, time, cancellationToken).ConfigureAwait(false)) + { + using (var fileStream = _fileSystem.GetFileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, true)) + { + await stream.CopyToAsync(fileStream).ConfigureAwait(false); + } + } + chapter.ImagePath = path; changesMade = true; } |
