mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 04:45:36 +00:00
vdpausink: fix error handling if gst_vdp_get_device returns NULL
This commit is contained in:
parent
61710ee3e4
commit
64f4970c84
1 changed files with 6 additions and 2 deletions
|
@ -591,6 +591,7 @@ static gboolean
|
|||
gst_vdp_sink_start (GstBaseSink * bsink)
|
||||
{
|
||||
VdpSink *vdp_sink = GST_VDP_SINK (bsink);
|
||||
gboolean res = TRUE;
|
||||
|
||||
vdp_sink->window = NULL;
|
||||
vdp_sink->cur_image = NULL;
|
||||
|
@ -601,10 +602,13 @@ gst_vdp_sink_start (GstBaseSink * bsink)
|
|||
vdp_sink->fps_d = 1;
|
||||
|
||||
GST_OBJECT_LOCK (vdp_sink);
|
||||
vdp_sink->device = gst_vdp_sink_setup_device (vdp_sink);
|
||||
if (!vdp_sink->device) {
|
||||
if (!(vdp_sink->device = gst_vdp_sink_setup_device (vdp_sink)))
|
||||
res = FALSE;
|
||||
}
|
||||
GST_OBJECT_UNLOCK (vdp_sink);
|
||||
|
||||
return TRUE;
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue