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
3f8d9536
Commit
3f8d9536
authored
Aug 11, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP sout: get rid of block_FifoWake and don't get stuck in mwait()
parent
af2e2a70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+15
-11
No files found.
modules/stream_out/rtp.c
View file @
3f8d9536
...
...
@@ -1269,7 +1269,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
if
(
id
->
p_fifo
!=
NULL
)
{
vlc_object_kill
(
id
);
block_FifoWake
(
id
->
p_fifo
);
vlc_thread_join
(
id
);
block_FifoRelease
(
id
->
p_fifo
);
}
...
...
@@ -1434,13 +1433,11 @@ static void* ThreadSend( vlc_object_t *p_this )
{
sout_stream_id_t
*
id
=
(
sout_stream_id_t
*
)
p_this
;
unsigned
i_caching
=
id
->
i_caching
;
int
canc
=
vlc_savecancel
();
while
(
vlc_object_alive
(
id
)
)
for
(;;
)
{
block_t
*
out
=
block_FifoGet
(
id
->
p_fifo
);
if
(
out
==
NULL
)
continue
;
/* Forced wakeup */
block_cleanup_push
(
out
);
if
(
id
->
srtp
)
{
/* FIXME: this is awfully inefficient */
...
...
@@ -1448,21 +1445,28 @@ static void* ThreadSend( vlc_object_t *p_this )
out
=
block_Realloc
(
out
,
0
,
len
+
10
);
out
->
i_buffer
=
len
;
int
canc
=
vlc_savecancel
();
int
val
=
srtp_send
(
id
->
srtp
,
out
->
p_buffer
,
&
len
,
len
+
10
);
vlc_restorecancel
(
canc
);
if
(
val
)
{
errno
=
val
;
msg_Dbg
(
id
,
"SRTP sending error: %m"
);
block_Release
(
out
);
continue
;
out
=
NULL
;
}
else
out
->
i_buffer
=
len
;
}
mtime_t
i_date
=
out
->
i_dts
+
i_caching
;
ssize_t
len
=
out
->
i_buffer
;
if
(
out
)
mwait
(
out
->
i_dts
+
i_caching
);
vlc_cleanup_pop
();
if
(
out
==
NULL
)
continue
;
mwait
(
i_date
);
ssize_t
len
=
out
->
i_buffer
;
int
canc
=
vlc_savecancel
();
vlc_mutex_lock
(
&
id
->
lock_sink
);
unsigned
deadc
=
0
;
/* How many dead sockets? */
...
...
@@ -1499,8 +1503,8 @@ static void* ThreadSend( vlc_object_t *p_this )
msg_Dbg
(
id
,
"adding socket %d"
,
fd
);
rtp_add_sink
(
id
,
fd
,
true
);
}
}
vlc_restorecancel
(
canc
);
}
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