#include "film.h"
#include "transcoder.h"
#include "log.h"
-#include "safe_stringstream.h"
+#include <locked_sstream.h>
#include "compose.hpp"
#include <iostream>
#include <iomanip>
return Job::status ();
}
- SafeStringStream s;
+ locked_stringstream s;
s << Job::status ();
/* _transcoder might be destroyed by the job-runner thread */
shared_ptr<Transcoder> t = _transcoder;
- if (!t) {
- return 0;
+ if (!t || t->finishing()) {
+ /* We aren't doing any actual encoding so just use the job's guess */
+ return Job::remaining_time ();
}
+ /* We're encoding so guess based on the current encoding rate */
+
float fps = t->current_encoding_rate ();
if (fps == 0) {