Fixed: #2550 FLV video import - incorrect frame position caused by wrong FLV tag sort

This commit is contained in:
Jindra Petřík
2025-11-09 18:53:07 +01:00
parent 68075ea9c5
commit 3e2656e6fd
3 changed files with 6 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
- [#2552] Open with FFDec explorer menu shrinking sidebar
- [#2551] Showing too wide video tags in Flash player producing ValueTooLarge
exception. Also truncated video length.
- [#2550] FLV video import - incorrect frame position caused by wrong FLV tag sort
## [24.1.0] - 2025-09-28
### Added
@@ -4038,6 +4039,7 @@ Major version of SWF to XML export changed to 2.
[#2545]: https://www.free-decompiler.com/flash/issues/2545
[#2552]: https://www.free-decompiler.com/flash/issues/2552
[#2551]: https://www.free-decompiler.com/flash/issues/2551
[#2550]: https://www.free-decompiler.com/flash/issues/2550
[#2477]: https://www.free-decompiler.com/flash/issues/2477
[#2478]: https://www.free-decompiler.com/flash/issues/2478
[#2485]: https://www.free-decompiler.com/flash/issues/2485

View File

@@ -264,17 +264,17 @@ public class MovieImporter {
if (newWidth <= 0 || newHeight <= 0) {
throw new IOException("Invalid dimension");
}
movie.setPauseRendering(true);
movie.codecID = videoData.codecId;
movie.width = newWidth;
movie.height = newHeight;
movie.videoFlagsDeblocking = DefineVideoStreamTag.DEBLOCKING_OFF;
movie.videoFlagsSmoothing = true;
movie.setPauseRendering(true);
videoTags.sort(new Comparator<FLVTAG>() {
@Override
public int compare(FLVTAG o1, FLVTAG o2) {
return Long.compare(o1.timeStamp, o2.tagType);
return Long.compare(o1.timeStamp, o2.timeStamp);
}
});

View File

@@ -5446,7 +5446,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
File selfile = Helper.fixDialogFile(selectedFile);
try {
new MovieImporter().importMovie(movie, Helper.readFile(selfile.getAbsolutePath()));
refreshTree();
refreshTree(movie.getSwf());
} catch (IOException ex) {
logger.log(Level.SEVERE, "Invalid movie", ex);
ViewMessages.showMessageDialog(MainPanel.this, translate("error.movie.invalid") + ": " + ex.getMessage(), translate("error"), JOptionPane.ERROR_MESSAGE);