mild decoder adjustment
This commit is contained in:
@@ -211,13 +211,14 @@ FramePtr FFmpegDecoder::Retrieve(const rational &timecode, const rational &lengt
|
||||
// Set up seeking loop
|
||||
int64_t seek_ts = target_ts;
|
||||
int64_t second_ts = qRound(rational(avstream_->time_base).flipped().toDouble());
|
||||
bool got_frame = false;
|
||||
bool last_backtrack = false;
|
||||
|
||||
// FFmpeg frame retrieve loop
|
||||
while (ret >= 0 && frame_->pts != target_ts) {
|
||||
|
||||
// If the frame timestamp is too large, we need to seek back a little
|
||||
if (frame_->pts > target_ts || frame_->pts == AV_NOPTS_VALUE) {
|
||||
if (got_frame && (frame_->pts > target_ts || frame_->pts == AV_NOPTS_VALUE)) {
|
||||
// If we already tried seeking to 0 though, there's nothing we can do so we error here
|
||||
if (last_backtrack) {
|
||||
Error(tr("FFmpeg failed to seek to the correct location"));
|
||||
@@ -238,6 +239,7 @@ FramePtr FFmpegDecoder::Retrieve(const rational &timecode, const rational &lengt
|
||||
}
|
||||
|
||||
ret = GetFrame();
|
||||
got_frame = true;
|
||||
}
|
||||
|
||||
// Handle any errors received during the frame retrieve process
|
||||
|
||||
@@ -249,6 +249,8 @@ void RendererProcessor::CacheNext()
|
||||
|
||||
rational time_to_cache = cache_queue_.takeFirst();
|
||||
|
||||
qDebug() << "Caching" << time_to_cache.toDouble();
|
||||
|
||||
Node* node_to_cache = texture_input_->edges().first()->output()->parent();
|
||||
|
||||
// Run this probe in another thread
|
||||
@@ -257,7 +259,6 @@ void RendererProcessor::CacheNext()
|
||||
cache_return_count_ = 0;
|
||||
|
||||
for (int i=0;i<threads_.size();i++) {
|
||||
qDebug() << "Queued thread" << threads_.at(i).get();
|
||||
threads_.at(i)->Queue(path.GetThreadPath(i), time_to_cache);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user