fixed bug where an unindexed video would cache a blank first frame
This commit is contained in:
@@ -132,16 +132,15 @@ QVariant MediaInput::Value(NodeOutput *output, const rational &time)
|
||||
}
|
||||
|
||||
// Check if we need to get a frame or not
|
||||
if (frame_ == nullptr || frame_native_ts_ != decoder_->GetTimestampFromTime(time)) {
|
||||
if (frame_ == nullptr || frame_->native_timestamp() != decoder_->GetTimestampFromTime(time)) {
|
||||
// Get frame from Decoder
|
||||
frame_ = decoder_->Retrieve(time);
|
||||
|
||||
if (frame_ == nullptr) {
|
||||
qDebug() << "Received a null frame while time was" << time.toDouble();
|
||||
return 0;
|
||||
}
|
||||
|
||||
frame_native_ts_ = frame_->native_timestamp();
|
||||
|
||||
if (color_service_ == nullptr) {
|
||||
// FIXME: Hardcoded values for testing
|
||||
color_service_ = std::make_shared<ColorService>("srgb", OCIO::ROLE_SCENE_LINEAR);
|
||||
|
||||
@@ -77,7 +77,6 @@ private:
|
||||
GLuint ocio_texture_;
|
||||
|
||||
FramePtr frame_;
|
||||
int64_t frame_native_ts_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user