From d8ef6d637f0c716fcc65515de5d0a58fe13073c5 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 17 Nov 2004 17:44:38 +0000 Subject: [PATCH] added fix for the "last frame emtpy" problem. --- pdf2swf/swfoutput.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 3318cfb..dea823b 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1749,7 +1749,7 @@ void swfoutput_finalize(struct swfoutput*obj) if(i->tag && i->tag->id == ST_END) return; //already done - + if(i->frameno == i->lastframeno) // fix: add missing pagefeed swfoutput_pagefeed(obj); @@ -1767,6 +1767,15 @@ void swfoutput_finalize(struct swfoutput*obj) iterator = iterator->next; } i->tag = swf_InsertTag(i->tag,ST_END); + TAG* tag = i->tag->prev; + + /* remove the removeobject2 tags between the last ST_SHOWFRAME + and the ST_END- they confuse the flash player */ + while(tag->id == ST_REMOVEOBJECT2) { + TAG* prev = tag->prev; + swf_DeleteTag(tag); + tag = prev; + } } SWF* swfoutput_get(struct swfoutput*obj) -- 1.7.10.4