Commit 61d38c8e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2: fix race condition

(regression from 855f0b7d)
parent d082caf8
......@@ -90,6 +90,7 @@ int AccessOpen( vlc_object_t *obj )
/* fallback to direct kernel mode anyway */
fd = rawfd;
}
sys->fd = fd;
if (InitVideo (access, fd))
{
......@@ -97,7 +98,6 @@ int AccessOpen( vlc_object_t *obj )
goto error;
}
sys->fd = fd;
access->pf_seek = NULL;
access->pf_control = AccessControl;
return VLC_SUCCESS;
......
......@@ -95,6 +95,7 @@ int DemuxOpen( vlc_object_t *obj )
/* fallback to direct kernel mode anyway */
fd = rawfd;
}
sys->fd = fd;
if (InitVideo (demux, fd))
{
......@@ -102,7 +103,6 @@ int DemuxOpen( vlc_object_t *obj )
goto error;
}
sys->fd = fd;
sys->controls = ControlsInit (VLC_OBJECT(demux), fd);
demux->pf_demux = NULL;
demux->pf_control = DemuxControl;
......
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