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
b70d2acf
Commit
b70d2acf
authored
Mar 23, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udp: fix locking (fixes #14234) and cancellation
parent
f35c3d11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
modules/access/udp.c
modules/access/udp.c
+8
-5
No files found.
modules/access/udp.c
View file @
b70d2acf
...
...
@@ -258,9 +258,6 @@ static void* ThreadRead( void *data )
access_t
*
access
=
data
;
access_sys_t
*
sys
=
access
->
p_sys
;
vlc_fifo_Lock
(
sys
->
fifo
);
vlc_fifo_CleanupPush
(
sys
->
fifo
);
for
(;;)
{
block_t
*
pkt
=
block_Alloc
(
MTU
);
...
...
@@ -283,16 +280,22 @@ static void* ThreadRead( void *data )
pkt
->
i_buffer
=
len
;
vlc_fifo_Lock
(
sys
->
fifo
);
/* Discard old buffers on overflow */
while
(
vlc_fifo_GetBytes
(
sys
->
fifo
)
+
len
>
sys
->
fifo_size
)
{
int
canc
=
vlc_savecancel
();
block_Release
(
vlc_fifo_DequeueUnlocked
(
sys
->
fifo
));
vlc_restorecancel
(
canc
);
}
vlc_fifo_QueueUnlocked
(
sys
->
fifo
,
pkt
);
vlc_fifo_Unlock
(
sys
->
fifo
);
}
vlc_fifo_Lock
(
sys
->
fifo
);
sys
->
running
=
false
;
vlc_fifo_Signal
(
sys
->
fifo
);
vlc_cleanup_run
();
vlc_fifo_Unlock
(
sys
->
fifo
);
return
NULL
;
}
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