forked from mjameson-se/jebml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Handles case where we overflow void elements. (#4)
* feat: Handles case where we overflow void elements. Handles more tags and tracks. * squash: Account for isSeekable when creating void block. * squash: Adds logs for exception we swallow. * squash: Recreates the file after the move, open it again. * squash: Moves the logic into tracks and tag and fix it by seeking the correct src position when coping the end of the file. * squash: Fix seeking the original file. * squash: Fix setting end position. It was skipping the void data. * squash: Fix comment.
- Loading branch information
Showing
6 changed files
with
268 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,17 @@ | |
* JEBML - Java library to read/write EBML/Matroska elements. | ||
* Copyright (C) 2004 Jory Stone <[email protected]> | ||
* Based on Javatroska (C) 2002 John Cannon <[email protected]> | ||
* | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
@@ -42,6 +42,15 @@ public FileDataSource(final String filename, final String mode) throws FileNotFo | |
fc = file.getChannel(); | ||
} | ||
|
||
/** | ||
* Converts a writer to a reader. | ||
*/ | ||
public FileDataSource(FileDataWriter writer) throws FileNotFoundException, IOException | ||
{ | ||
file = writer.file; | ||
fc = writer.fc; | ||
} | ||
|
||
@Override | ||
public byte readByte() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.