Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
d92c6d82
Commit
d92c6d82
authored
Feb 16, 2015
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: notify when the thread message queue blocks.
This can help finding the source of A-V desync with live input.
parent
508d6a23
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
ffmpeg.c
ffmpeg.c
+10
-1
No files found.
ffmpeg.c
View file @
d92c6d82
...
@@ -3356,6 +3356,7 @@ static int check_keyboard_interaction(int64_t cur_time)
...
@@ -3356,6 +3356,7 @@ static int check_keyboard_interaction(int64_t cur_time)
static
void
*
input_thread
(
void
*
arg
)
static
void
*
input_thread
(
void
*
arg
)
{
{
InputFile
*
f
=
arg
;
InputFile
*
f
=
arg
;
unsigned
flags
=
f
->
non_blocking
?
AV_THREAD_MESSAGE_NONBLOCK
:
0
;
int
ret
=
0
;
int
ret
=
0
;
while
(
1
)
{
while
(
1
)
{
...
@@ -3371,7 +3372,15 @@ static void *input_thread(void *arg)
...
@@ -3371,7 +3372,15 @@ static void *input_thread(void *arg)
break
;
break
;
}
}
av_dup_packet
(
&
pkt
);
av_dup_packet
(
&
pkt
);
ret
=
av_thread_message_queue_send
(
f
->
in_thread_queue
,
&
pkt
,
0
);
ret
=
av_thread_message_queue_send
(
f
->
in_thread_queue
,
&
pkt
,
flags
);
if
(
flags
&&
ret
==
AVERROR
(
EAGAIN
))
{
flags
=
0
;
ret
=
av_thread_message_queue_send
(
f
->
in_thread_queue
,
&
pkt
,
flags
);
av_log
(
f
->
ctx
,
AV_LOG_WARNING
,
"Thread message queue blocking; consider raising the "
"thread_queue_size option (current value: %d)
\n
"
,
f
->
thread_queue_size
);
}
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
if
(
ret
!=
AVERROR_EOF
)
if
(
ret
!=
AVERROR_EOF
)
av_log
(
f
->
ctx
,
AV_LOG_ERROR
,
av_log
(
f
->
ctx
,
AV_LOG_ERROR
,
...
...
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