Commit 8d128f8b authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

decklinkvideosrc: remove unnecessary checks for non-NULL frame

We can't get a NULL frame here.

CID 1359923
parent d0e553a6
......@@ -550,9 +550,10 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
f = (CaptureFrame *) g_queue_pop_head (&self->current_frames);
g_mutex_unlock (&self->lock);
g_assert (f != NULL);
if (self->flushing) {
if (f)
capture_frame_free (f);
capture_frame_free (f);
GST_DEBUG_OBJECT (self, "Flushing");
return GST_FLOW_FLUSHING;
}
......@@ -566,8 +567,7 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
self->caps_mode = f->mode;
} else {
g_mutex_unlock (&self->lock);
if (f)
capture_frame_free (f);
capture_frame_free (f);
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
("Invalid mode in captured frame"),
("Mode set to %d but captured %d", self->caps_mode, f->mode));
......@@ -582,8 +582,7 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
self->caps_format = f->format;
} else {
g_mutex_unlock (&self->lock);
if (f)
capture_frame_free (f);
capture_frame_free (f);
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
("Invalid pixel format in captured frame"),
("Format set to %d but captured %d", self->caps_format, f->format));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment