Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4ab00739
Commit
4ab00739
authored
Jan 24, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use standard memory management functions
parent
a82fd8f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
modules/access/v4l2/v4l2.c
modules/access/v4l2/v4l2.c
+3
-5
No files found.
modules/access/v4l2/v4l2.c
View file @
4ab00739
...
...
@@ -515,7 +515,6 @@ struct buffer_t
{
void
*
start
;
size_t
length
;
void
*
orig_userp
;
};
struct
demux_sys_t
...
...
@@ -1128,7 +1127,7 @@ static void DemuxClose( vlc_object_t *p_this )
case
IO_METHOD_USERPTR
:
for
(
i
=
0
;
i
<
p_sys
->
i_nbuffers
;
++
i
)
{
free
(
p_sys
->
p_buffers
[
i
].
orig_userp
);
free
(
p_sys
->
p_buffers
[
i
].
start
);
}
break
;
}
...
...
@@ -1756,7 +1755,7 @@ static int InitUserP( demux_t *p_demux, int i_fd, unsigned int i_buffer_size )
struct
v4l2_requestbuffers
req
;
unsigned
int
i_page_size
;
i_page_size
=
getpagesize
(
);
i_page_size
=
sysconf
(
_SC_PAGESIZE
);
i_buffer_size
=
(
i_buffer_size
+
i_page_size
-
1
)
&
~
(
i_page_size
-
1
);
memset
(
&
req
,
0
,
sizeof
(
req
)
);
...
...
@@ -1780,8 +1779,7 @@ static int InitUserP( demux_t *p_demux, int i_fd, unsigned int i_buffer_size )
for
(
p_sys
->
i_nbuffers
=
0
;
p_sys
->
i_nbuffers
<
4
;
++
p_sys
->
i_nbuffers
)
{
p_sys
->
p_buffers
[
p_sys
->
i_nbuffers
].
length
=
i_buffer_size
;
p_sys
->
p_buffers
[
p_sys
->
i_nbuffers
].
start
=
vlc_memalign
(
&
p_sys
->
p_buffers
[
p_sys
->
i_nbuffers
].
orig_userp
,
posix_memalign
(
&
p_sys
->
p_buffers
[
p_sys
->
i_nbuffers
].
start
,
/* boundary */
i_page_size
,
i_buffer_size
);
if
(
!
p_sys
->
p_buffers
[
p_sys
->
i_nbuffers
].
start
)
...
...
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