Skip to content

Commit cf298ec

Browse files
author
David Foerster
committed
Close output stream when finalising encoding writer
1 parent 4503924 commit cf298ec

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/javaFlacEncoder/FLACOutputStream.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,6 @@ public interface FLACOutputStream {
9898
* @return current write position.
9999
*/
100100
public long getPos();
101+
102+
public void close() throws IOException;
101103
}

src/javaFlacEncoder/FLACStreamController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public void closeFLACStream(byte[] md5Hash, StreamConfiguration streamConfig)
109109
this.writeDataToOutput(streamInfo);
110110
}
111111
flacStreamIsOpen = false;
112+
out.close();
112113
} finally {
113114
streamLock.unlock();
114115
}

0 commit comments

Comments
 (0)