From 83f678d1a19cdafe4c7b18bdcb43801bfe15850f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 26 Dec 2022 23:53:35 +0100 Subject: [PATCH] Movie importer - properly set timeline num frames --- .../jpexs/decompiler/flash/importers/MovieImporter.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/MovieImporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/MovieImporter.java index 8d495b04d..b4aef0c32 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/MovieImporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/MovieImporter.java @@ -278,6 +278,7 @@ public class MovieImporter { } } } + int numTimelineFrames = timelined == null ? 0 : timelined.getFrameCount(); int importLastFrame = -1; if (timelined != null) { @@ -347,6 +348,7 @@ public class MovieImporter { ShowFrameTag sft = new ShowFrameTag(swf); sft.setTimelined(timelined); timelined.addTag(sft); + numTimelineFrames++; p++; } swfFrameNum--; @@ -401,8 +403,9 @@ public class MovieImporter { placeObject.ratio = swfFrameNum - startFrame; timelined.addTag(placeObject); ShowFrameTag sft = new ShowFrameTag(swf); - sft.setTimelined(timelined); + sft.setTimelined(timelined); timelined.addTag(sft); + numTimelineFrames++; } swfFrameNum--; } @@ -411,6 +414,10 @@ public class MovieImporter { } } + if (timelined != null) { + timelined.setFrameCount(numTimelineFrames); + } + movie.numFrames = importLastFrame - startFrame + 1; List tagsToRemove = new ArrayList<>();