mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
decklinkvideosrc: Fix previous commit
The frames queue might return nothing (be empty) if we're flushing. Move the assertion to after the flushing check
This commit is contained in:
parent
d7b7d9deb7
commit
41283361fa
1 changed files with 5 additions and 3 deletions
|
@ -550,14 +550,16 @@ 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) {
|
||||||
capture_frame_free (f);
|
if (f)
|
||||||
|
capture_frame_free (f);
|
||||||
GST_DEBUG_OBJECT (self, "Flushing");
|
GST_DEBUG_OBJECT (self, "Flushing");
|
||||||
return GST_FLOW_FLUSHING;
|
return GST_FLOW_FLUSHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we're not flushing, we should have a valid frame from the queue
|
||||||
|
g_assert (f != NULL);
|
||||||
|
|
||||||
g_mutex_lock (&self->lock);
|
g_mutex_lock (&self->lock);
|
||||||
if (self->caps_mode != f->mode) {
|
if (self->caps_mode != f->mode) {
|
||||||
if (self->mode == GST_DECKLINK_MODE_AUTO) {
|
if (self->mode == GST_DECKLINK_MODE_AUTO) {
|
||||||
|
|
Loading…
Reference in a new issue