mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/libzmq: Check return of zmq_setsockopt
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f2e7864496
commit
1054b68a62
@ -123,7 +123,14 @@ static int zmq_proto_open(URLContext *h, const char *uri, int flags)
|
||||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
|
||||
zmq_setsockopt(s->socket, ZMQ_SUBSCRIBE, "", 0);
|
||||
ret = zmq_setsockopt(s->socket, ZMQ_SUBSCRIBE, "", 0);
|
||||
if (ret == -1) {
|
||||
av_log(h, AV_LOG_ERROR, "Error occured during zmq_setsockopt(): %s\n", ZMQ_STRERROR);
|
||||
zmq_close(s->socket);
|
||||
zmq_ctx_term(s->context);
|
||||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
|
||||
ret = zmq_connect(s->socket, uri);
|
||||
if (ret == -1) {
|
||||
av_log(h, AV_LOG_ERROR, "Error occured during zmq_connect(): %s\n", ZMQ_STRERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user