X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Flistimporter.cpp;h=b5d5f44f783b1e969d6abd618e2da9a2ed4cf752;hb=d43ed398fd84b93b96eb91d91dafdf65c80537e6;hp=02680f02f8cf561eff2d3691b3640f58493c0c58;hpb=adfc80c126f482d7ea2bac38001a2c4a7c7df88c;p=synfig.git diff --git a/synfig-core/src/synfig/listimporter.cpp b/synfig-core/src/synfig/listimporter.cpp index 02680f0..b5d5f44 100644 --- a/synfig-core/src/synfig/listimporter.cpp +++ b/synfig-core/src/synfig/listimporter.cpp @@ -150,9 +150,11 @@ ListImporter::~ListImporter() } bool -ListImporter::get_frame(Surface &surface,Time time, ProgressCallback *cb) +ListImporter::get_frame(Surface &surface, const RendDesc &renddesc, Time time, ProgressCallback *cb) { - int frame=round_to_int(time*fps); + float document_fps=renddesc.get_frame_rate(); + int document_frame=round_to_int(time*document_fps); + int frame=floor_to_int(document_frame*fps/document_fps); if(!filename_list.size()) { @@ -184,7 +186,7 @@ ListImporter::get_frame(Surface &surface,Time time, ProgressCallback *cb) return false; } - if(!importer->get_frame(surface,0,cb)) + if(!importer->get_frame(surface,renddesc,0,cb)) { if(cb)cb->error(_("Unable to get frame from ")+filename_list[frame]); else synfig::error(_("Unable to get frame from ")+filename_list[frame]);