diff options
author | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-06-17 15:45:32 +0200 |
---|---|---|
committer | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-06-17 15:45:32 +0200 |
commit | e84f05aeceff30413ad2d1ee68bb11888e04e167 (patch) | |
tree | 0eba52d79ab1efda13ca5d9741cc8c851e906129 | |
parent | f62a7a8cd7c03f7694ea5260ac38b1f2cf7826d5 (diff) | |
download | mediapointer-dvb-s2-e84f05aeceff30413ad2d1ee68bb11888e04e167.tar.gz mediapointer-dvb-s2-e84f05aeceff30413ad2d1ee68bb11888e04e167.tar.bz2 |
libv4l: fix deadlock introduced by locking fix in previous patch
From: Hans de Goede <hdegoede@redhat.com>
libv4l: fix deadlock introduced by locking fix in previous patch
Priority: normal
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | v4l2-apps/libv4l/libv4l2/libv4l2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/v4l2-apps/libv4l/libv4l2/libv4l2.c b/v4l2-apps/libv4l/libv4l2/libv4l2.c index 36fb8e21e..b71c9b4c6 100644 --- a/v4l2-apps/libv4l/libv4l2/libv4l2.c +++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c @@ -773,7 +773,9 @@ int v4l2_ioctl (int fd, unsigned long int request, ...) V4L2_LOG("Setting pixelformat to RGB24 (supported_dst_fmt_only)"); devices[index].flags |= V4L2_STREAM_TOUCHED; fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24; + pthread_mutex_unlock(&devices[index].stream_lock); v4l2_ioctl(fd, VIDIOC_S_FMT, &fmt); + pthread_mutex_lock(&devices[index].stream_lock); V4L2_LOG("Done setting pixelformat (supported_dst_fmt_only)"); } devices[index].flags |= V4L2_STREAM_TOUCHED; |