mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
decklinkvideosrc: remove unnecessary checks for non-NULL frame
We can't get a NULL frame here. CID 1359923
This commit is contained in:
parent
d0e553a6d3
commit
8d128f8bf5
1 changed files with 5 additions and 6 deletions
|
@ -550,8 +550,9 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
|
||||||
f = (CaptureFrame *) g_queue_pop_head (&self->current_frames);
|
f = (CaptureFrame *) g_queue_pop_head (&self->current_frames);
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
|
|
||||||
|
g_assert (f != NULL);
|
||||||
|
|
||||||
if (self->flushing) {
|
if (self->flushing) {
|
||||||
if (f)
|
|
||||||
capture_frame_free (f);
|
capture_frame_free (f);
|
||||||
GST_DEBUG_OBJECT (self, "Flushing");
|
GST_DEBUG_OBJECT (self, "Flushing");
|
||||||
return GST_FLOW_FLUSHING;
|
return GST_FLOW_FLUSHING;
|
||||||
|
@ -566,7 +567,6 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
|
||||||
self->caps_mode = f->mode;
|
self->caps_mode = f->mode;
|
||||||
} else {
|
} else {
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
if (f)
|
|
||||||
capture_frame_free (f);
|
capture_frame_free (f);
|
||||||
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
||||||
("Invalid mode in captured frame"),
|
("Invalid mode in captured frame"),
|
||||||
|
@ -582,7 +582,6 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
|
||||||
self->caps_format = f->format;
|
self->caps_format = f->format;
|
||||||
} else {
|
} else {
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
if (f)
|
|
||||||
capture_frame_free (f);
|
capture_frame_free (f);
|
||||||
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
||||||
("Invalid pixel format in captured frame"),
|
("Invalid pixel format in captured frame"),
|
||||||
|
|
Loading…
Reference in a new issue