Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
753e14b8
Commit
753e14b8
authored
Apr 14, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/access/v4l/v4l.c: off by one fix by James MacLean.
parent
3bc52380
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
modules/access/v4l/v4l.c
modules/access/v4l/v4l.c
+6
-7
No files found.
modules/access/v4l/v4l.c
View file @
753e14b8
...
...
@@ -2,11 +2,11 @@
* v4l.c : Video4Linux input module for vlc
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id
: v4l.c,v 1.41 2004/02/12 17:52:48 fenrir Exp
$
* $Id$
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
* Paul Forgey <paulf at aphrodite dot com>
* Gildas Bazin <gbazin@
netcourrier.com
>
* Gildas Bazin <gbazin@
videolan.org
>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -1289,8 +1289,9 @@ static int GrabAudio( input_thread_t * p_input,
static
uint8_t
*
GrabCapture
(
input_thread_t
*
p_input
)
{
access_sys_t
*
p_sys
=
p_input
->
p_access_data
;
p_sys
->
vid_mmap
.
frame
=
(
p_sys
->
i_frame_pos
+
1
)
%
p_sys
->
vid_mbuf
.
frames
;
int
i_captured_frame
=
p_sys
->
i_frame_pos
;
p_sys
->
vid_mmap
.
frame
=
(
p_sys
->
i_frame_pos
+
1
)
%
p_sys
->
vid_mbuf
.
frames
;
for
(
;;
)
{
if
(
ioctl
(
p_sys
->
fd_video
,
VIDIOCMCAPTURE
,
&
p_sys
->
vid_mmap
)
>=
0
)
...
...
@@ -1306,14 +1307,12 @@ static uint8_t *GrabCapture( input_thread_t *p_input )
msg_Dbg
(
p_input
,
"another try ?"
);
}
//msg_Warn( p_input, "grab a new frame" );
while
(
ioctl
(
p_sys
->
fd_video
,
VIDIOCSYNC
,
&
p_sys
->
i_frame_pos
)
<
0
&&
(
errno
==
EAGAIN
||
errno
==
EINTR
)
);
p_sys
->
i_frame_pos
=
p_sys
->
vid_mmap
.
frame
;
/* leave i_video_frame_size alone */
return
p_sys
->
p_video_mmap
+
p_sys
->
vid_mbuf
.
offsets
[
p_sys
->
i_frame_pos
];
return
p_sys
->
p_video_mmap
+
p_sys
->
vid_mbuf
.
offsets
[
i_captured_frame
];
}
static
uint8_t
*
GrabMJPEG
(
input_thread_t
*
p_input
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment