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
dd00f9ca
Commit
dd00f9ca
authored
Dec 23, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/zmqsend: use valid NULL log context
The zmq context is not a valid log context. Fix crash.
parent
99978320
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
zmqsend.c
tools/zmqsend.c
+5
-5
No files found.
tools/zmqsend.c
View file @
dd00f9ca
...
@@ -97,14 +97,14 @@ int main(int argc, char **argv)
...
@@ -97,14 +97,14 @@ int main(int argc, char **argv)
socket
=
zmq_socket
(
ctx
,
ZMQ_REQ
);
socket
=
zmq_socket
(
ctx
,
ZMQ_REQ
);
if
(
!
socket
)
{
if
(
!
socket
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
av_log
(
NULL
,
AV_LOG_ERROR
,
"Could not create ZMQ socket: %s
\n
"
,
zmq_strerror
(
errno
));
"Could not create ZMQ socket: %s
\n
"
,
zmq_strerror
(
errno
));
ret
=
1
;
ret
=
1
;
goto
end
;
goto
end
;
}
}
if
(
zmq_connect
(
socket
,
bind_address
)
==
-
1
)
{
if
(
zmq_connect
(
socket
,
bind_address
)
==
-
1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Could not bind ZMQ responder to address '%s': %s
\n
"
,
av_log
(
NULL
,
AV_LOG_ERROR
,
"Could not bind ZMQ responder to address '%s': %s
\n
"
,
bind_address
,
zmq_strerror
(
errno
));
bind_address
,
zmq_strerror
(
errno
));
ret
=
1
;
ret
=
1
;
goto
end
;
goto
end
;
...
@@ -131,14 +131,14 @@ int main(int argc, char **argv)
...
@@ -131,14 +131,14 @@ int main(int argc, char **argv)
}
}
if
(
zmq_msg_init
(
&
msg
)
==
-
1
)
{
if
(
zmq_msg_init
(
&
msg
)
==
-
1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
av_log
(
NULL
,
AV_LOG_ERROR
,
"Could not initialize receiving message: %s
\n
"
,
zmq_strerror
(
errno
));
"Could not initialize receiving message: %s
\n
"
,
zmq_strerror
(
errno
));
ret
=
1
;
ret
=
1
;
goto
end
;
goto
end
;
}
}
if
(
zmq_msg_recv
(
&
msg
,
socket
,
0
)
==
-
1
)
{
if
(
zmq_msg_recv
(
&
msg
,
socket
,
0
)
==
-
1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
av_log
(
NULL
,
AV_LOG_ERROR
,
"Could not receive message: %s
\n
"
,
zmq_strerror
(
errno
));
"Could not receive message: %s
\n
"
,
zmq_strerror
(
errno
));
zmq_msg_close
(
&
msg
);
zmq_msg_close
(
&
msg
);
ret
=
1
;
ret
=
1
;
...
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
...
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
recv_buf_size
=
zmq_msg_size
(
&
msg
)
+
1
;
recv_buf_size
=
zmq_msg_size
(
&
msg
)
+
1
;
recv_buf
=
av_malloc
(
recv_buf_size
);
recv_buf
=
av_malloc
(
recv_buf_size
);
if
(
!
recv_buf
)
{
if
(
!
recv_buf
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
av_log
(
NULL
,
AV_LOG_ERROR
,
"Could not allocate receiving message buffer
\n
"
);
"Could not allocate receiving message buffer
\n
"
);
zmq_msg_close
(
&
msg
);
zmq_msg_close
(
&
msg
);
ret
=
1
;
ret
=
1
;
...
...
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