#if CONFIG_NETWORK
if (ctx->buffer_size >= 0 && (flags & AVIO_FLAG_WRITE)) {
int tmp = ctx->buffer_size;
- setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp));
+ if (setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp))) {
+ rc = AVERROR_EXTERNAL;
+ goto fail;
+ }
}
#endif