Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
1a8e62c8
Commit
1a8e62c8
authored
Nov 16, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvbinfo: protect buffer depth count with mutex.
parent
93012b7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/dvbinfo/buffer.c
examples/dvbinfo/buffer.c
+1
-1
No files found.
examples/dvbinfo/buffer.c
View file @
1a8e62c8
...
...
@@ -137,6 +137,7 @@ void fifo_push(fifo_t *fifo, buffer_t *buffer)
if
(
buffer
==
NULL
)
return
;
pthread_mutex_lock
(
&
fifo
->
lock
);
for
(
p_last
=
buffer
;
;
p_last
=
p_last
->
p_next
)
{
i_depth
++
;
...
...
@@ -144,7 +145,6 @@ void fifo_push(fifo_t *fifo, buffer_t *buffer)
break
;
}
pthread_mutex_lock
(
&
fifo
->
lock
);
*
fifo
->
pp_last
=
buffer
;
fifo
->
pp_last
=
&
p_last
->
p_next
;
fifo
->
i_count
+=
i_depth
;
...
...
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