diff --git a/src/main/java/com/ddf/vodsystem/services/MetadataService.java b/src/main/java/com/ddf/vodsystem/services/MetadataService.java index 9006c15..7c9bf8e 100644 --- a/src/main/java/com/ddf/vodsystem/services/MetadataService.java +++ b/src/main/java/com/ddf/vodsystem/services/MetadataService.java @@ -40,12 +40,14 @@ public class MetadataService { process = pb.start(); handleFfprobeError(process); logger.info("Metadata for file {} finished with exit code {}", file.getAbsolutePath(), process.exitValue()); + process.destroy(); return parseVideoMetadata(readStandardOutput(process)); - } catch (IOException | InterruptedException e) { + } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new FFMPEGException(e.getMessage()); + } catch (IOException e) { + throw new FFMPEGException(e.getMessage()); } - } public VideoMetadata getInputFileMetadata(String uuid) {