Skip to content

Commit

Permalink
Release file descriptor even when releasing of android muxer fails
Browse files Browse the repository at this point in the history
  • Loading branch information
vamshi-dhulipala committed Apr 17, 2024
1 parent 6f4fb88 commit bacb28f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,11 @@ public void writeSampleData(int targetTrack, @NonNull ByteBuffer buffer, @NonNul

@Override
public void release() {
mediaMuxer.release();
releaseFileDescriptor();
try {
mediaMuxer.release();
} finally {
releaseFileDescriptor();
}
}

@Override
Expand Down

0 comments on commit bacb28f

Please sign in to comment.