Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
22203a58
Commit
22203a58
authored
Oct 16, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shm: fix capture with non page-size frame size (maybe fixes #7579)
parent
e9ffcf98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/access/shm.c
modules/access/shm.c
+4
-3
No files found.
modules/access/shm.c
View file @
22203a58
...
...
@@ -119,6 +119,7 @@ struct demux_sys_t
{
const
void
*
addr
;
size_t
length
;
size_t
size
;
es_out_id_t
*
es
;
mtime_t
pts
,
interval
;
/* pts is protected by the lock. The rest is read-only. */
...
...
@@ -169,7 +170,7 @@ static int Open (vlc_object_t *obj)
if
(
sys
->
length
==
0
)
goto
error
;
pagesize
--
;
sys
->
length
=
(
sys
->
length
+
pagesize
)
&
~
pagesize
;
/* pad */
sys
->
size
=
(
sys
->
length
+
pagesize
)
&
~
pagesize
;
/* pad */
char
*
path
=
var_InheritString
(
demux
,
"shm-file"
);
if
(
path
!=
NULL
)
...
...
@@ -182,7 +183,7 @@ static int Open (vlc_object_t *obj)
goto
error
;
}
void
*
mem
=
mmap
(
NULL
,
sys
->
length
,
PROT_READ
,
MAP_SHARED
,
fd
,
0
);
void
*
mem
=
mmap
(
NULL
,
sys
->
size
,
PROT_READ
,
MAP_SHARED
,
fd
,
0
);
close
(
fd
);
if
(
mem
==
MAP_FAILED
)
{
...
...
@@ -271,7 +272,7 @@ static void Close (vlc_object_t *obj)
static
void
map_detach
(
demux_sys_t
*
sys
)
{
munmap
((
void
*
)
sys
->
addr
,
sys
->
length
);
munmap
((
void
*
)
sys
->
addr
,
sys
->
size
);
}
#ifdef HAVE_SYS_SHM_H
...
...
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