[vlc-commits] v4l2: remove dead userptr code
Rémi Denis-Courmont
git at videolan.org
Wed Apr 4 21:41:56 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 4 22:33:34 2012 +0300| [644e9c55ea85370afe037f271cdf9dbdd6fde2e4] | committer: Rémi Denis-Courmont
v4l2: remove dead userptr code
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=644e9c55ea85370afe037f271cdf9dbdd6fde2e4
---
modules/access/v4l2/demux.c | 9 +--------
modules/access/v4l2/v4l2.h | 1 -
2 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index d494915..13bce7e 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -544,7 +544,6 @@ void DemuxClose( vlc_object_t *obj )
break;
case IO_METHOD_MMAP:
- case IO_METHOD_USERPTR:
{
/* NOTE: Some buggy drivers hang if buffers are not unmapped before
* streamoff */
@@ -552,8 +551,7 @@ void DemuxClose( vlc_object_t *obj )
{
struct v4l2_buffer buf = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
- .memory = ( sys->io == IO_METHOD_USERPTR ) ?
- V4L2_MEMORY_USERPTR : V4L2_MEMORY_MMAP,
+ .memory = V4L2_MEMORY_MMAP,
};
v4l2_ioctl( fd, VIDIOC_DQBUF, &buf );
}
@@ -576,11 +574,6 @@ void DemuxClose( vlc_object_t *obj )
v4l2_munmap( sys->p_buffers[i].start,
sys->p_buffers[i].length );
break;
-
- case IO_METHOD_USERPTR:
- for( unsigned i = 0; i < sys->i_nbuffers; ++i )
- free( sys->p_buffers[i].start );
- break;
}
free( sys->p_buffers );
}
diff --git a/modules/access/v4l2/v4l2.h b/modules/access/v4l2/v4l2.h
index 8e5e6e5..479e57f 100644
--- a/modules/access/v4l2/v4l2.h
+++ b/modules/access/v4l2/v4l2.h
@@ -71,7 +71,6 @@ extern int (*v4l2_munmap) (void *, size_t);
typedef enum {
IO_METHOD_READ=1,
IO_METHOD_MMAP,
- IO_METHOD_USERPTR,
} io_method;
typedef struct vlc_v4l2_ctrl vlc_v4l2_ctrl_t;
More information about the vlc-commits
mailing list