cleanup frame grabber gst timer

This commit is contained in:
Bruno Herbelin
2021-12-03 01:03:21 +01:00
parent 68b2c5e0c1
commit 1157c0b1c5
2 changed files with 6 additions and 1 deletions

View File

@@ -287,6 +287,9 @@ FrameGrabber::~FrameGrabber()
gst_object_unref (src_);
if (caps_ != nullptr)
gst_caps_unref (caps_);
if (timer_)
gst_object_unref (timer_);
if (pipeline_ != nullptr) {
GstState state = GST_STATE_NULL;
gst_element_set_state (pipeline_, state);
@@ -405,6 +408,9 @@ void FrameGrabber::addFrame (GstBuffer *buffer, GstCaps *caps)
}
// else show warning
else {
// end frame grabber
finished_ = true;
// inform
Log::Warning("%s", msg.c_str());
}
}

View File

@@ -78,7 +78,6 @@ protected:
guint64 buffering_size_;
bool timestamp_on_clock_;
// async threaded initializer
std::future<std::string> initializer_;
static std::string initialize(FrameGrabber *rec, GstCaps *caps);