diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c index a22a0ad8f4..39b4fd19a8 100644 --- a/sys/v4l2/gstv4l2videodec.c +++ b/sys/v4l2/gstv4l2videodec.c @@ -254,7 +254,8 @@ gst_v4l2_video_dec_set_format (GstVideoDecoder * decoder, * the complexity and should not have much impact in performance since the * following allocation query will happen on a drained pipeline and won't * block. */ - if (!gst_v4l2_buffer_pool_orphan (&self->v4l2capture->pool)) { + if (self->v4l2capture->pool && + !gst_v4l2_buffer_pool_orphan (&self->v4l2capture->pool)) { GstCaps *caps = gst_pad_get_current_caps (decoder->srcpad); if (caps) { GstQuery *query = gst_query_new_allocation (caps, FALSE);